Skip to content

Commit edb87a5

Browse files
committed
added a Whats new dialog
1 parent 7f6cbbb commit edb87a5

File tree

10 files changed

+55
-0
lines changed

10 files changed

+55
-0
lines changed

app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ import android.view.Menu
99
import android.view.MenuItem
1010
import android.view.View
1111
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
12+
import com.simplemobiletools.commons.extensions.checkWhatsNew
1213
import com.simplemobiletools.commons.extensions.toast
1314
import com.simplemobiletools.commons.extensions.updateTextColors
1415
import com.simplemobiletools.commons.extensions.value
1516
import com.simplemobiletools.commons.helpers.LICENSE_AMBILWARNA
1617
import com.simplemobiletools.commons.helpers.LICENSE_KOTLIN
1718
import com.simplemobiletools.commons.helpers.LICENSE_RTL
1819
import com.simplemobiletools.commons.helpers.LICENSE_STETHO
20+
import com.simplemobiletools.commons.models.Release
1921
import com.simplemobiletools.notes.BuildConfig
2022
import com.simplemobiletools.notes.R
2123
import com.simplemobiletools.notes.adapters.NotesPagerAdapter
@@ -44,6 +46,7 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
4446

4547
pager_title_strip.setTextSize(TypedValue.COMPLEX_UNIT_PX, getTextSize())
4648
pager_title_strip.layoutParams.height = (pager_title_strip.height + resources.getDimension(R.dimen.activity_margin) * 2).toInt()
49+
checkWhatsNewDialog()
4750
}
4851

4952
fun initViewPager() {
@@ -202,4 +205,11 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
202205
mCurrentNote = mNotes[position]
203206
config.currentNoteId = mCurrentNote.id
204207
}
208+
209+
private fun checkWhatsNewDialog() {
210+
arrayListOf<Release>().apply {
211+
add(Release(25, R.string.release_25))
212+
checkWhatsNew(this, BuildConfig.VERSION_CODE)
213+
}
214+
}
205215
}

app/src/main/res/values-de/strings.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<string name="center">Zentriert</string>
2727
<string name="right">Rechtsbündig</string>
2828

29+
<!-- Release notes -->
30+
<string name="release_25">
31+
Added more color customization options\n
32+
Your settings have been cleared, please reset them</string>
33+
2934
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
3035
<!-- Short description has to have less than 80 chars -->
3136
<string name="app_short_description">Ein einfaches Textfeld für Notizen. Komplett ohne Werbung</string>

app/src/main/res/values-es/strings.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<string name="center">Centrado</string>
2727
<string name="right">Derecha</string>
2828

29+
<!-- Release notes -->
30+
<string name="release_25">
31+
Added more color customization options\n
32+
Your settings have been cleared, please reset them</string>
33+
2934
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
3035
<!-- Short description has to have less than 80 chars -->
3136
<string name="app_short_description">Un simple campo de texto para añadir breves y rápidas notas, sin anuncios.</string>

app/src/main/res/values-fr/strings.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<string name="center">Centre</string>
2727
<string name="right">Droite</string>
2828

29+
<!-- Release notes -->
30+
<string name="release_25">
31+
Added more color customization options\n
32+
Your settings have been cleared, please reset them</string>
33+
2934
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
3035
<!-- Short description has to have less than 80 chars -->
3136
<string name="app_short_description">Un champ texte simple pour ajouter des notes rapides, sans publicités.</string>

app/src/main/res/values-hu/strings.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<string name="center">Középre</string>
2727
<string name="right">Jobbra</string>
2828

29+
<!-- Release notes -->
30+
<string name="release_25">
31+
Added more color customization options\n
32+
Your settings have been cleared, please reset them</string>
33+
2934
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
3035
<!-- Short description has to have less than 80 chars -->
3136
<string name="app_short_description">Egyszerű szövegmező gyors jegyzetírásra, reklámok nélkül.</string>

app/src/main/res/values-it/strings.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<string name="center">Center</string>
2727
<string name="right">Right</string>
2828

29+
<!-- Release notes -->
30+
<string name="release_25">
31+
Added more color customization options\n
32+
Your settings have been cleared, please reset them</string>
33+
2934
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
3035
<!-- Short description has to have less than 80 chars -->
3136
<string name="app_short_description">A simple textfield for adding quick notes, without ads.</string>

app/src/main/res/values-ja/strings.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<string name="center">中央</string>
2727
<string name="right">右</string>
2828

29+
<!-- Release notes -->
30+
<string name="release_25">
31+
Added more color customization options\n
32+
Your settings have been cleared, please reset them</string>
33+
2934
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
3035
<!-- Short description has to have less than 80 chars -->
3136
<string name="app_short_description">簡単なメモを追加するためのシンプルなテキストフィールド。広告はありません。</string>

app/src/main/res/values-pt-rPT/strings.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<string name="center">Centro</string>
2727
<string name="right">Direita</string>
2828

29+
<!-- Release notes -->
30+
<string name="release_25">
31+
Added more color customization options\n
32+
Your settings have been cleared, please reset them</string>
33+
2934
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
3035
<!-- Short description has to have less than 80 chars -->
3136
<string name="app_short_description">Um campo de texto para adicionar as suas notas.</string>

app/src/main/res/values-sv/strings.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<string name="center">Center</string>
2727
<string name="right">Right</string>
2828

29+
<!-- Release notes -->
30+
<string name="release_25">
31+
Added more color customization options\n
32+
Your settings have been cleared, please reset them</string>
33+
2934
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
3035
<!-- Short description has to have less than 80 chars -->
3136
<string name="app_short_description">A simple textfield for adding quick notes, without ads.</string>

app/src/main/res/values/strings.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<string name="center">Center</string>
2727
<string name="right">Right</string>
2828

29+
<!-- Release notes -->
30+
<string name="release_25">
31+
Added more color customization options\n
32+
Your settings have been cleared, please reset them</string>
33+
2934
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
3035
<!-- Short description has to have less than 80 chars -->
3136
<string name="app_short_description">A simple textfield for adding quick notes, without ads.</string>

0 commit comments

Comments
 (0)