add a toggle for avoiding showing Whats New on startup
This commit is contained in:
parent
e66ec05ba6
commit
b2fe9e6be3
|
@ -45,7 +45,7 @@ ext {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:3.9.9'
|
||||
implementation 'com.simplemobiletools:commons:3.9.10'
|
||||
implementation 'joda-time:joda-time:2.9.9'
|
||||
|
||||
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
|
||||
|
|
|
@ -20,6 +20,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
|
||||
setupCustomizeColors()
|
||||
setupUseEnglish()
|
||||
setupAvoidWhatsNew()
|
||||
setupShowInfoBubble()
|
||||
setupShowContactThumbnails()
|
||||
setupShowPhoneNumbers()
|
||||
|
@ -44,6 +45,14 @@ class SettingsActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupAvoidWhatsNew() {
|
||||
settings_avoid_whats_new.isChecked = config.avoidWhatsNew
|
||||
settings_avoid_whats_new_holder.setOnClickListener {
|
||||
settings_avoid_whats_new.toggle()
|
||||
config.avoidWhatsNew = settings_avoid_whats_new.isChecked
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupShowInfoBubble() {
|
||||
settings_show_info_bubble.isChecked = config.showInfoBubble
|
||||
settings_show_info_bubble_holder.setOnClickListener {
|
||||
|
|
|
@ -50,6 +50,26 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_avoid_whats_new_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||
android:id="@+id/settings_avoid_whats_new"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:paddingLeft="@dimen/medium_margin"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:text="@string/avoid_whats_new"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_show_info_bubble_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in New Issue