mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +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()
|
||||
setupKeepLastModified()
|
||||
setupShowInfoBubble()
|
||||
setupOneFingerZoom()
|
||||
setupShowExtendedDetails()
|
||||
setupManageExtendedDetails()
|
||||
setupOneFingerZoom()
|
||||
updateTextColors(settings_holder)
|
||||
}
|
||||
|
||||
|
@ -273,27 +273,14 @@ class SettingsActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupScreenRotation() {
|
||||
settings_screen_rotation.text = getScreenRotationText()
|
||||
settings_screen_rotation_holder.setOnClickListener {
|
||||
val items = arrayListOf(
|
||||
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 setupOneFingerZoom() {
|
||||
settings_one_finger_zoom.isChecked = config.oneFingerZoom
|
||||
settings_one_finger_zoom_holder.setOnClickListener {
|
||||
settings_one_finger_zoom.toggle()
|
||||
config.oneFingerZoom = settings_one_finger_zoom.isChecked
|
||||
}
|
||||
}
|
||||
|
||||
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() {
|
||||
settings_show_extended_details.isChecked = config.showExtendedDetails
|
||||
settings_show_extended_details_holder.setOnClickListener {
|
||||
|
@ -314,11 +301,24 @@ class SettingsActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupOneFingerZoom() {
|
||||
settings_one_finger_zoom.isChecked = config.oneFingerZoom
|
||||
settings_one_finger_zoom_holder.setOnClickListener {
|
||||
settings_one_finger_zoom.toggle()
|
||||
config.oneFingerZoom = settings_one_finger_zoom.isChecked
|
||||
private fun setupScreenRotation() {
|
||||
settings_screen_rotation.text = getScreenRotationText()
|
||||
settings_screen_rotation_holder.setOnClickListener {
|
||||
val items = arrayListOf(
|
||||
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
|
||||
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
|
||||
android:id="@+id/settings_one_finger_zoom_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -486,6 +467,25 @@
|
|||
|
||||
</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
|
||||
android:id="@+id/settings_manage_extended_details_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in a new issue