mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
add a toggle for preventing showing Whats New
This commit is contained in:
parent
b3578e51aa
commit
8524970d6d
3 changed files with 31 additions and 1 deletions
|
@ -46,7 +46,7 @@ ext {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:3.9.4'
|
||||
implementation 'com.simplemobiletools:commons:3.9.10'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
|
||||
implementation 'com.android.support:multidex:1.0.2'
|
||||
implementation 'com.google.code.gson:gson:2.8.2'
|
||||
|
|
|
@ -33,6 +33,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
|
||||
setupCustomizeColors()
|
||||
setupUseEnglish()
|
||||
setupAvoidWhatsNew()
|
||||
setupManageIncludedFolders()
|
||||
setupManageExcludedFolders()
|
||||
setupManageHiddenFolders()
|
||||
|
@ -88,6 +89,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 setupManageIncludedFolders() {
|
||||
settings_manage_included_folders_holder.setOnClickListener {
|
||||
startActivity(Intent(this, IncludedFoldersActivity::class.java))
|
||||
|
|
|
@ -50,6 +50,27 @@
|
|||
|
||||
</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>
|
||||
|
||||
<View
|
||||
android:id="@+id/visibility_divider"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in a new issue