From 0a6394597c4481e781d37b7a14f21300872c9130 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 3 Nov 2018 20:27:49 +0100 Subject: [PATCH] removing the local resources variable at Settings activity --- .../gallery/activities/SettingsActivity.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt index 01a413724..5d3f56c6c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -1,7 +1,6 @@ package com.simplemobiletools.gallery.activities import android.content.Intent -import android.content.res.Resources import android.os.Bundle import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog @@ -23,13 +22,11 @@ import kotlinx.android.synthetic.main.activity_settings.* import java.util.* class SettingsActivity : SimpleActivity() { - lateinit var res: Resources private var mRecycleBinContentSize = 0L override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_settings) - res = resources } override fun onResume() { @@ -447,9 +444,9 @@ class SettingsActivity : SimpleActivity() { 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))) + RadioItem(ROTATE_BY_SYSTEM_SETTING, getString(R.string.screen_rotation_system_setting)), + RadioItem(ROTATE_BY_DEVICE_ROTATION, getString(R.string.screen_rotation_device_rotation)), + RadioItem(ROTATE_BY_ASPECT_RATIO, getString(R.string.screen_rotation_aspect_ratio))) RadioGroupDialog(this@SettingsActivity, items, config.screenRotation) { config.screenRotation = it as Int