mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-12-03 17:57:59 +01:00
move the one finger zoom above Extended media settings
This commit is contained in:
parent
2dc178b79d
commit
ab7b086497
2 changed files with 43 additions and 43 deletions
|
@ -57,9 +57,9 @@ class SettingsActivity : SimpleActivity() {
|
||||||
setupShowMediaCount()
|
setupShowMediaCount()
|
||||||
setupKeepLastModified()
|
setupKeepLastModified()
|
||||||
setupShowInfoBubble()
|
setupShowInfoBubble()
|
||||||
|
setupOneFingerZoom()
|
||||||
setupShowExtendedDetails()
|
setupShowExtendedDetails()
|
||||||
setupManageExtendedDetails()
|
setupManageExtendedDetails()
|
||||||
setupOneFingerZoom()
|
|
||||||
updateTextColors(settings_holder)
|
updateTextColors(settings_holder)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,26 +273,13 @@ class SettingsActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupScreenRotation() {
|
private fun setupOneFingerZoom() {
|
||||||
settings_screen_rotation.text = getScreenRotationText()
|
settings_one_finger_zoom.isChecked = config.oneFingerZoom
|
||||||
settings_screen_rotation_holder.setOnClickListener {
|
settings_one_finger_zoom_holder.setOnClickListener {
|
||||||
val items = arrayListOf(
|
settings_one_finger_zoom.toggle()
|
||||||
RadioItem(ROTATE_BY_SYSTEM_SETTING, res.getString(R.string.screen_rotation_system_setting)),
|
config.oneFingerZoom = settings_one_finger_zoom.isChecked
|
||||||
RadioItem(ROTATE_BY_DEVICE_ROTATION, res.getString(R.string.screen_rotation_device_rotation)),
|
|
||||||
RadioItem(ROTATE_BY_ASPECT_RATIO, res.getString(R.string.screen_rotation_aspect_ratio)))
|
|
||||||
|
|
||||||
RadioGroupDialog(this@SettingsActivity, items, config.screenRotation) {
|
|
||||||
config.screenRotation = it as Int
|
|
||||||
settings_screen_rotation.text = getScreenRotationText()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private fun getScreenRotationText() = getString(when (config.screenRotation) {
|
|
||||||
ROTATE_BY_SYSTEM_SETTING -> R.string.screen_rotation_system_setting
|
|
||||||
ROTATE_BY_DEVICE_ROTATION -> R.string.screen_rotation_device_rotation
|
|
||||||
else -> R.string.screen_rotation_aspect_ratio
|
|
||||||
})
|
|
||||||
|
|
||||||
private fun setupShowExtendedDetails() {
|
private fun setupShowExtendedDetails() {
|
||||||
settings_show_extended_details.isChecked = config.showExtendedDetails
|
settings_show_extended_details.isChecked = config.showExtendedDetails
|
||||||
|
@ -314,11 +301,24 @@ class SettingsActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupOneFingerZoom() {
|
private fun setupScreenRotation() {
|
||||||
settings_one_finger_zoom.isChecked = config.oneFingerZoom
|
settings_screen_rotation.text = getScreenRotationText()
|
||||||
settings_one_finger_zoom_holder.setOnClickListener {
|
settings_screen_rotation_holder.setOnClickListener {
|
||||||
settings_one_finger_zoom.toggle()
|
val items = arrayListOf(
|
||||||
config.oneFingerZoom = settings_one_finger_zoom.isChecked
|
RadioItem(ROTATE_BY_SYSTEM_SETTING, res.getString(R.string.screen_rotation_system_setting)),
|
||||||
|
RadioItem(ROTATE_BY_DEVICE_ROTATION, res.getString(R.string.screen_rotation_device_rotation)),
|
||||||
|
RadioItem(ROTATE_BY_ASPECT_RATIO, res.getString(R.string.screen_rotation_aspect_ratio)))
|
||||||
|
|
||||||
|
RadioGroupDialog(this@SettingsActivity, items, config.screenRotation) {
|
||||||
|
config.screenRotation = it as Int
|
||||||
|
settings_screen_rotation.text = getScreenRotationText()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun getScreenRotationText() = getString(when (config.screenRotation) {
|
||||||
|
ROTATE_BY_SYSTEM_SETTING -> R.string.screen_rotation_system_setting
|
||||||
|
ROTATE_BY_DEVICE_ROTATION -> R.string.screen_rotation_device_rotation
|
||||||
|
else -> R.string.screen_rotation_aspect_ratio
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -447,25 +447,6 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_show_extended_details_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_show_extended_details"
|
|
||||||
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_extended_details"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_one_finger_zoom_holder"
|
android:id="@+id/settings_one_finger_zoom_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -486,6 +467,25 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_show_extended_details_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_show_extended_details"
|
||||||
|
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_extended_details"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_manage_extended_details_holder"
|
android:id="@+id/settings_manage_extended_details_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in a new issue