add an activity for managing favorite items
This commit is contained in:
parent
f250fee69c
commit
20bfd48e3f
|
@ -28,6 +28,11 @@
|
||||||
android:label="@string/about"
|
android:label="@string/about"
|
||||||
android:parentActivityName=".activities.MainActivity"/>
|
android:parentActivityName=".activities.MainActivity"/>
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name="com.simplemobiletools.filemanager.activities.FavoritesActivity"
|
||||||
|
android:label="@string/favorites"
|
||||||
|
android:parentActivityName=".activities.MainActivity"/>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.simplemobiletools.commons.activities.LicenseActivity"
|
android:name="com.simplemobiletools.commons.activities.LicenseActivity"
|
||||||
android:label="@string/third_party_licences"
|
android:label="@string/third_party_licences"
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.simplemobiletools.filemanager.activities
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.simplemobiletools.filemanager.R
|
||||||
|
|
||||||
|
class FavoritesActivity : SimpleActivity() {
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
setContentView(R.layout.activity_favorites)
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
package com.simplemobiletools.filemanager.activities
|
package com.simplemobiletools.filemanager.activities
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||||
import com.simplemobiletools.filemanager.R
|
import com.simplemobiletools.filemanager.R
|
||||||
|
@ -16,6 +17,7 @@ class SettingsActivity : SimpleActivity() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
|
||||||
setupCustomizeColors()
|
setupCustomizeColors()
|
||||||
|
setupManageFavorites()
|
||||||
setupShowHidden()
|
setupShowHidden()
|
||||||
updateTextColors(settings_holder)
|
updateTextColors(settings_holder)
|
||||||
}
|
}
|
||||||
|
@ -26,6 +28,12 @@ class SettingsActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun setupManageFavorites() {
|
||||||
|
settings_manage_favorites_holder.setOnClickListener {
|
||||||
|
startActivity(Intent(this, FavoritesActivity::class.java))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun setupShowHidden() {
|
private fun setupShowHidden() {
|
||||||
settings_show_hidden.isChecked = config.showHidden
|
settings_show_hidden.isChecked = config.showHidden
|
||||||
settings_show_hidden_holder.setOnClickListener {
|
settings_show_hidden_holder.setOnClickListener {
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ScrollView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/favorites_scrollview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/favorites_wrapper"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/favorites_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/favorites_placeholder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingLeft="@dimen/big_margin"
|
||||||
|
android:paddingRight="@dimen/big_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
</ScrollView>
|
|
@ -30,6 +30,25 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_manage_favorites_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_favorites"
|
||||||
|
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_favorites"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_show_hidden_holder"
|
android:id="@+id/settings_show_hidden_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in New Issue