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 86da33c0d..cd821d518 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt
@@ -1,11 +1,11 @@
package com.simplemobiletools.gallery.activities
import android.os.Bundle
-import android.view.View
-import android.widget.AdapterView
import com.simplemobiletools.commons.extensions.updateTextColors
import com.simplemobiletools.gallery.R
import com.simplemobiletools.gallery.extensions.config
+import com.simplemobiletools.gallery.helpers.IMAGES
+import com.simplemobiletools.gallery.helpers.IMAGES_AND_VIDEOS
import kotlinx.android.synthetic.main.activity_settings.*
class SettingsActivity : SimpleActivity() {
@@ -65,14 +65,15 @@ class SettingsActivity : SimpleActivity() {
}
private fun setupShowMedia() {
- settings_show_media.setSelection(config.showMedia)
- settings_show_media.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
- override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
- config.showMedia = settings_show_media.selectedItemPosition
- }
+ settings_show_media.text = getShowMediaText(config.showMedia)
+ settings_show_media_holder.setOnClickListener {
- override fun onNothingSelected(parent: AdapterView<*>?) {
- }
}
}
+
+ private fun getShowMediaText(id: Int) = getString(when (id) {
+ IMAGES_AND_VIDEOS -> R.string.images_and_videos
+ IMAGES -> R.string.images
+ else -> R.string.videos
+ })
}
diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml
index 0f2bc8621..9ab83b25f 100644
--- a/app/src/main/res/layout/activity_settings.xml
+++ b/app/src/main/res/layout/activity_settings.xml
@@ -115,10 +115,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
- android:paddingBottom="@dimen/activity_margin"
+ android:paddingBottom="@dimen/bigger_margin"
android:paddingLeft="@dimen/activity_margin"
- android:paddingRight="@dimen/medium_margin"
- android:paddingTop="@dimen/activity_margin">
+ android:paddingRight="@dimen/activity_margin"
+ android:paddingTop="@dimen/bigger_margin">
-
+ android:layout_marginEnd="@dimen/small_margin"
+ android:layout_marginRight="@dimen/small_margin"
+ android:background="@null"
+ android:clickable="false"/>