add an option for preventing displaying of Whats New
This commit is contained in:
parent
93efa29037
commit
9eee225341
|
@ -11,7 +11,6 @@ import com.simplemobiletools.calendar.BuildConfig
|
||||||
import com.simplemobiletools.calendar.R
|
import com.simplemobiletools.calendar.R
|
||||||
import com.simplemobiletools.calendar.dialogs.CustomEventReminderDialog
|
import com.simplemobiletools.calendar.dialogs.CustomEventReminderDialog
|
||||||
import com.simplemobiletools.calendar.dialogs.SelectCalendarsDialog
|
import com.simplemobiletools.calendar.dialogs.SelectCalendarsDialog
|
||||||
import com.simplemobiletools.calendar.dialogs.SnoozePickerDialog
|
|
||||||
import com.simplemobiletools.calendar.extensions.*
|
import com.simplemobiletools.calendar.extensions.*
|
||||||
import com.simplemobiletools.calendar.helpers.CalDAVHandler
|
import com.simplemobiletools.calendar.helpers.CalDAVHandler
|
||||||
import com.simplemobiletools.calendar.helpers.FONT_SIZE_LARGE
|
import com.simplemobiletools.calendar.helpers.FONT_SIZE_LARGE
|
||||||
|
@ -50,6 +49,7 @@ class SettingsActivity : SimpleActivity() {
|
||||||
setupManageEventTypes()
|
setupManageEventTypes()
|
||||||
setupHourFormat()
|
setupHourFormat()
|
||||||
setupSundayFirst()
|
setupSundayFirst()
|
||||||
|
setupAvoidWhatsNew()
|
||||||
setupDeleteAllEvents()
|
setupDeleteAllEvents()
|
||||||
setupReplaceDescription()
|
setupReplaceDescription()
|
||||||
setupWeekNumbers()
|
setupWeekNumbers()
|
||||||
|
@ -205,6 +205,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 setupDeleteAllEvents() {
|
private fun setupDeleteAllEvents() {
|
||||||
settings_delete_all_events_holder.setOnClickListener {
|
settings_delete_all_events_holder.setOnClickListener {
|
||||||
ConfirmationDialog(this, messageId = R.string.delete_all_events_confirmation) {
|
ConfirmationDialog(this, messageId = R.string.delete_all_events_confirmation) {
|
||||||
|
|
|
@ -109,6 +109,26 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</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
|
<RelativeLayout
|
||||||
android:id="@+id/settings_delete_all_events_holder"
|
android:id="@+id/settings_delete_all_events_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in New Issue