mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 13:08:00 +01:00
removing the local resources variable at Settings activity
This commit is contained in:
parent
d9021efacb
commit
0a6394597c
1 changed files with 3 additions and 6 deletions
|
@ -1,7 +1,6 @@
|
||||||
package com.simplemobiletools.gallery.activities
|
package com.simplemobiletools.gallery.activities
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.res.Resources
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||||
|
@ -23,13 +22,11 @@ import kotlinx.android.synthetic.main.activity_settings.*
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class SettingsActivity : SimpleActivity() {
|
class SettingsActivity : SimpleActivity() {
|
||||||
lateinit var res: Resources
|
|
||||||
private var mRecycleBinContentSize = 0L
|
private var mRecycleBinContentSize = 0L
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_settings)
|
setContentView(R.layout.activity_settings)
|
||||||
res = resources
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
|
@ -447,9 +444,9 @@ class SettingsActivity : SimpleActivity() {
|
||||||
settings_screen_rotation.text = getScreenRotationText()
|
settings_screen_rotation.text = getScreenRotationText()
|
||||||
settings_screen_rotation_holder.setOnClickListener {
|
settings_screen_rotation_holder.setOnClickListener {
|
||||||
val items = arrayListOf(
|
val items = arrayListOf(
|
||||||
RadioItem(ROTATE_BY_SYSTEM_SETTING, res.getString(R.string.screen_rotation_system_setting)),
|
RadioItem(ROTATE_BY_SYSTEM_SETTING, getString(R.string.screen_rotation_system_setting)),
|
||||||
RadioItem(ROTATE_BY_DEVICE_ROTATION, res.getString(R.string.screen_rotation_device_rotation)),
|
RadioItem(ROTATE_BY_DEVICE_ROTATION, getString(R.string.screen_rotation_device_rotation)),
|
||||||
RadioItem(ROTATE_BY_ASPECT_RATIO, res.getString(R.string.screen_rotation_aspect_ratio)))
|
RadioItem(ROTATE_BY_ASPECT_RATIO, getString(R.string.screen_rotation_aspect_ratio)))
|
||||||
|
|
||||||
RadioGroupDialog(this@SettingsActivity, items, config.screenRotation) {
|
RadioGroupDialog(this@SettingsActivity, items, config.screenRotation) {
|
||||||
config.screenRotation = it as Int
|
config.screenRotation = it as Int
|
||||||
|
|
Loading…
Reference in a new issue