add a setting button for managing included folders

This commit is contained in:
tibbi 2017-03-17 22:54:44 +01:00
parent 87b34b4386
commit dc98df713d
5 changed files with 56 additions and 0 deletions

View File

@ -96,6 +96,11 @@
android:configChanges="orientation|keyboardHidden|screenSize" android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/FullScreenTheme"/> android:theme="@style/FullScreenTheme"/>
<activity
android:name=".activities.IncludedFoldersActivity"
android:label="@string/include_folders"
android:parentActivityName=".activities.SettingsActivity"/>
<activity <activity
android:name=".activities.ExcludedFoldersActivity" android:name=".activities.ExcludedFoldersActivity"
android:label="@string/excluded_folders" android:label="@string/excluded_folders"

View File

@ -0,0 +1,11 @@
package com.simplemobiletools.gallery.activities
import android.os.Bundle
import com.simplemobiletools.gallery.R
class IncludedFoldersActivity : SimpleActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_included_folders)
}
}

View File

@ -26,6 +26,7 @@ class SettingsActivity : SimpleActivity() {
super.onResume() super.onResume()
setupCustomizeColors() setupCustomizeColors()
setupManageIncludedFolders()
setupManageExcludedFolders() setupManageExcludedFolders()
setupShowHiddenFolders() setupShowHiddenFolders()
setupAutoplayVideos() setupAutoplayVideos()
@ -42,6 +43,12 @@ class SettingsActivity : SimpleActivity() {
} }
} }
private fun setupManageIncludedFolders() {
settings_manage_included_folders_holder.setOnClickListener {
startActivity(Intent(this, IncludedFoldersActivity::class.java))
}
}
private fun setupManageExcludedFolders() { private fun setupManageExcludedFolders() {
settings_manage_excluded_folders_holder.setOnClickListener { settings_manage_excluded_folders_holder.setOnClickListener {
startActivity(Intent(this, ExcludedFoldersActivity::class.java)) startActivity(Intent(this, ExcludedFoldersActivity::class.java))

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/included_folders_scrollview"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/included_folders_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"/>
</ScrollView>

View File

@ -30,6 +30,25 @@
</RelativeLayout> </RelativeLayout>
<RelativeLayout
android:id="@+id/settings_manage_included_folders_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.MyTextView
android:id="@+id/settings_manage_included_folders"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:paddingLeft="@dimen/medium_margin"
android:paddingStart="@dimen/medium_margin"
android:text="@string/manage_included_folders"/>
</RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/settings_manage_excluded_folders_holder" android:id="@+id/settings_manage_excluded_folders_holder"
android:layout_width="match_parent" android:layout_width="match_parent"