add a toggle for showing some fullscreen image actions at the bottom
This commit is contained in:
parent
5062d3f087
commit
5de6eb9765
4 changed files with 37 additions and 0 deletions
|
@ -57,6 +57,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
setupDeleteEmptyFolders()
|
||||
setupAllowPhotoGestures()
|
||||
setupAllowVideoGestures()
|
||||
setupBottomActions()
|
||||
setupShowMediaCount()
|
||||
setupKeepLastModified()
|
||||
setupShowInfoBubble()
|
||||
|
@ -295,6 +296,14 @@ class SettingsActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupBottomActions() {
|
||||
settings_bottom_actions.isChecked = config.bottomActions
|
||||
settings_bottom_actions_holder.setOnClickListener {
|
||||
settings_bottom_actions.toggle()
|
||||
config.bottomActions = settings_bottom_actions.isChecked
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupShowMediaCount() {
|
||||
settings_show_media_count.isChecked = config.showMediaCount
|
||||
settings_show_media_count_holder.setOnClickListener {
|
||||
|
|
|
@ -243,6 +243,10 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
get() = prefs.getBoolean(ALLOW_VIDEO_GESTURES, true)
|
||||
set(allowVideoGestures) = prefs.edit().putBoolean(ALLOW_VIDEO_GESTURES, allowVideoGestures).apply()
|
||||
|
||||
var bottomActions: Boolean
|
||||
get() = prefs.getBoolean(BOTTOM_ACTIONS, true)
|
||||
set(bottomActions) = prefs.edit().putBoolean(BOTTOM_ACTIONS, bottomActions).apply()
|
||||
|
||||
var showMediaCount: Boolean
|
||||
get() = prefs.getBoolean(SHOW_MEDIA_COUNT, true)
|
||||
set(showMediaCount) = prefs.edit().putBoolean(SHOW_MEDIA_COUNT, showMediaCount).apply()
|
||||
|
|
|
@ -49,6 +49,7 @@ const val WAS_NEW_APP_SHOWN = "was_new_app_shown_clock"
|
|||
const val LAST_FILEPICKER_PATH = "last_filepicker_path"
|
||||
const val WAS_OTG_HANDLED = "was_otg_handled"
|
||||
const val TEMP_SKIP_DELETE_CONFIRMATION = "temp_skip_delete_confirmation"
|
||||
const val BOTTOM_ACTIONS = "bottom_actions"
|
||||
|
||||
// slideshow
|
||||
const val SLIDESHOW_INTERVAL = "slideshow_interval"
|
||||
|
|
|
@ -672,6 +672,29 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_bottom_actions_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingBottom="@dimen/activity_margin"
|
||||
android:paddingLeft="@dimen/normal_margin"
|
||||
android:paddingRight="@dimen/normal_margin"
|
||||
android:paddingTop="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||
android:id="@+id/settings_bottom_actions"
|
||||
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/show_at_bottom"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_screen_rotation_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in a new issue