diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ExcludedFoldersActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ExcludedFoldersActivity.kt index 2d584ab73..e106475d4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ExcludedFoldersActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ExcludedFoldersActivity.kt @@ -5,10 +5,13 @@ import android.view.Menu import android.view.MenuItem import com.simplemobiletools.commons.dialogs.FilePickerDialog import com.simplemobiletools.commons.extensions.beVisibleIf +import com.simplemobiletools.commons.helpers.VIEW_TYPE_GRID +import com.simplemobiletools.commons.helpers.isRPlus import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener import com.simplemobiletools.gallery.pro.R import com.simplemobiletools.gallery.pro.adapters.ManageFoldersAdapter import com.simplemobiletools.gallery.pro.extensions.config +import com.simplemobiletools.gallery.pro.helpers.MAX_COLUMN_COUNT import kotlinx.android.synthetic.main.activity_manage_folders.* class ExcludedFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { @@ -21,10 +24,16 @@ class ExcludedFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { private fun updateFolders() { val folders = ArrayList() config.excludedFolders.mapTo(folders) { it } + var placeholderText = getString(R.string.excluded_activity_placeholder) manage_folders_placeholder.apply { - text = getString(R.string.excluded_activity_placeholder) beVisibleIf(folders.isEmpty()) setTextColor(config.textColor) + + if (isRPlus()) { + placeholderText = placeholderText.substringBefore("\n") + } + + text = placeholderText } val adapter = ManageFoldersAdapter(this, folders, true, this, manage_folders_list) {} @@ -33,6 +42,7 @@ class ExcludedFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.menu_add_folder, menu) + menu.findItem(R.id.add_folder).isVisible = !isRPlus() updateMenuItemColors(menu) return true } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt index 9fc433513..15c15c221 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt @@ -168,6 +168,7 @@ class SettingsActivity : SimpleActivity() { } private fun setupFileLoadingPriority() { + settings_file_loading_priority_holder.beGoneIf(isRPlus()) settings_file_loading_priority.text = getFileLoadingPriorityText() settings_file_loading_priority_holder.setOnClickListener { val items = arrayListOf( @@ -192,6 +193,7 @@ class SettingsActivity : SimpleActivity() { ) private fun setupManageIncludedFolders() { + settings_manage_included_folders_holder.beGoneIf(isRPlus()) settings_manage_included_folders_holder.setOnClickListener { startActivity(Intent(this, IncludedFoldersActivity::class.java)) } @@ -204,7 +206,7 @@ class SettingsActivity : SimpleActivity() { } private fun setupManageHiddenFolders() { - settings_manage_hidden_folders_holder.beVisibleIf(!isQPlus()) + settings_manage_hidden_folders_holder.beGoneIf(isQPlus()) settings_manage_hidden_folders_holder.setOnClickListener { handleHiddenFolderPasswordProtection { startActivity(Intent(this, HiddenFoldersActivity::class.java)) @@ -213,6 +215,11 @@ class SettingsActivity : SimpleActivity() { } private fun setupShowHiddenItems() { + if (isRPlus()) { + settings_show_hidden_items_holder.beGone() + settings_manage_excluded_folders_holder.background = resources.getDrawable(R.drawable.ripple_bottom_corners, theme) + } + settings_show_hidden_items.isChecked = config.showHiddenMedia settings_show_hidden_items_holder.setOnClickListener { if (config.showHiddenMedia) { @@ -308,6 +315,7 @@ class SettingsActivity : SimpleActivity() { } private fun setupHiddenItemPasswordProtection() { + settings_hidden_item_password_protection_holder.beGoneIf(isRPlus()) settings_hidden_item_password_protection.isChecked = config.isHiddenPasswordProtectionOn settings_hidden_item_password_protection_holder.setOnClickListener { val tabToShow = if (config.isHiddenPasswordProtectionOn) config.hiddenProtectionType else SHOW_ALL_TABS diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 94208c356..656f5948f 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -706,28 +706,12 @@ android:background="@drawable/section_holder_stroke" android:orientation="vertical"> - - - - - - + android:background="@drawable/ripple_top_corners"> + + + + + +