updating commons with some design changes

This commit is contained in:
tibbi 2022-07-23 21:48:40 +02:00
parent eed9a14c54
commit c892145536
15 changed files with 520 additions and 474 deletions

View file

@ -64,7 +64,7 @@ android {
}
dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:7f3e880dc5'
implementation 'com.github.SimpleMobileTools:Simple-Commons:387fbe81cc'
implementation 'com.github.tibbi:AndroidPdfViewer:da57ff410e'
implementation 'com.github.Stericson:RootTools:df729dcb13'
implementation 'com.github.Stericson:RootShell:1.6'

View file

@ -69,6 +69,8 @@ class MainActivity : SimpleActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
appLaunched(BuildConfig.APPLICATION_ID)
setupOptionsMenu()
refreshMenuItems()
mTabsToShow = getTabsList()
if (!config.wasStorageAnalysisTabAdded && isOreoPlus()) {
@ -108,6 +110,8 @@ class MainActivity : SimpleActivity() {
}
setupTabColors()
setupToolbar(main_toolbar, searchMenuItem = searchMenuItem)
getAllFragments().forEach {
it?.onResume(getProperTextColor())
}
@ -140,19 +144,12 @@ class MainActivity : SimpleActivity() {
config.temporarilyShowHidden = false
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.menu, menu)
setupSearch(menu)
updateMenuItemColors(menu)
return true
}
override fun onPrepareOptionsMenu(menu: Menu?): Boolean {
val currentFragment = getCurrentFragment() ?: return true
private fun refreshMenuItems() {
val currentFragment = getCurrentFragment() ?: return
val currentViewType = config.getFolderViewType(currentFragment.currentPath)
val favorites = config.favorites
menu!!.apply {
main_toolbar.menu.apply {
findItem(R.id.search).isVisible = currentFragment is ItemsFragment
findItem(R.id.sort).isVisible = currentFragment is ItemsFragment
findItem(R.id.change_view_type).isVisible = currentFragment !is StorageFragment
@ -172,33 +169,34 @@ class MainActivity : SimpleActivity() {
currentViewType == VIEW_TYPE_GRID && config.fileColumnCnt < MAX_COLUMN_COUNT && currentFragment !is StorageFragment
findItem(R.id.reduce_column_count).isVisible = currentViewType == VIEW_TYPE_GRID && config.fileColumnCnt > 1 && currentFragment !is StorageFragment
}
return true
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (getCurrentFragment() == null) {
return true
}
private fun setupOptionsMenu() {
setupSearch(main_toolbar.menu)
main_toolbar.setOnMenuItemClickListener { menuItem ->
if (getCurrentFragment() == null) {
return@setOnMenuItemClickListener true
}
when (item.itemId) {
R.id.go_home -> goHome()
R.id.go_to_favorite -> goToFavorite()
R.id.sort -> showSortingDialog()
R.id.add_favorite -> addFavorite()
R.id.remove_favorite -> removeFavorite()
R.id.toggle_filename -> toggleFilenameVisibility()
R.id.set_as_home -> setAsHome()
R.id.change_view_type -> changeViewType()
R.id.temporarily_show_hidden -> tryToggleTemporarilyShowHidden()
R.id.stop_showing_hidden -> tryToggleTemporarilyShowHidden()
R.id.increase_column_count -> increaseColumnCount()
R.id.reduce_column_count -> reduceColumnCount()
R.id.settings -> launchSettings()
R.id.about -> launchAbout()
else -> return super.onOptionsItemSelected(item)
when (menuItem.itemId) {
R.id.go_home -> goHome()
R.id.go_to_favorite -> goToFavorite()
R.id.sort -> showSortingDialog()
R.id.add_favorite -> addFavorite()
R.id.remove_favorite -> removeFavorite()
R.id.toggle_filename -> toggleFilenameVisibility()
R.id.set_as_home -> setAsHome()
R.id.change_view_type -> changeViewType()
R.id.temporarily_show_hidden -> tryToggleTemporarilyShowHidden()
R.id.stop_showing_hidden -> tryToggleTemporarilyShowHidden()
R.id.increase_column_count -> increaseColumnCount()
R.id.reduce_column_count -> reduceColumnCount()
R.id.settings -> launchSettings()
R.id.about -> launchAbout()
else -> return@setOnMenuItemClickListener false
}
return@setOnMenuItemClickListener true
}
return true
}
override fun onSaveInstanceState(outState: Bundle) {
@ -405,7 +403,7 @@ class MainActivity : SimpleActivity() {
getAllFragments().forEach {
(it as? ItemOperationsListener)?.finishActMode()
}
invalidateOptionsMenu()
refreshMenuItems()
}
})
main_view_pager.currentItem = config.lastUsedViewPagerPage
@ -458,7 +456,7 @@ class MainActivity : SimpleActivity() {
updateBottomTabItemColors(inactiveView, false)
}
val bottomBarColor = getBottomTabsBackgroundColor()
val bottomBarColor = getBottomNavigationBackgroundColor()
main_tabs_holder.setBackgroundColor(bottomBarColor)
updateNavigationBarColor(bottomBarColor)
}

View file

@ -339,7 +339,7 @@ class ReadTextActivity : SimpleActivity() {
}
private fun closeSearch() {
searchQueryET.text.clear()
searchQueryET.text?.clear()
isSearchActive = false
search_wrapper.beGone()
}

View file

@ -2,7 +2,6 @@ package com.simplemobiletools.filemanager.pro.activities
import android.content.Intent
import android.os.Bundle
import android.view.Menu
import com.simplemobiletools.commons.dialogs.ChangeDateTimeFormatDialog
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
@ -25,6 +24,7 @@ class SettingsActivity : SimpleActivity() {
override fun onResume() {
super.onResume()
setupToolbar(settings_toolbar, NavigationIcon.Arrow)
setupCustomizeColors()
setupUseEnglish()
@ -41,8 +41,7 @@ class SettingsActivity : SimpleActivity() {
setupKeepLastModified()
setupDeleteConfirmation()
setupEnableRootAccess()
updateTextColors(settings_holder)
invalidateOptionsMenu()
updateTextColors(settings_nested_scrollview)
arrayOf(
settings_color_customization_label,
@ -67,11 +66,6 @@ class SettingsActivity : SimpleActivity() {
}
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
updateMenuItemColors(menu)
return super.onCreateOptionsMenu(menu)
}
private fun setupCustomizeColors() {
settings_customize_colors_holder.setOnClickListener {
startCustomizationActivity()

View file

@ -1,9 +1,9 @@
package com.simplemobiletools.filemanager.pro.dialogs
import android.view.View
import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.getAlertDialogBuilder
import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.commons.helpers.*
import com.simplemobiletools.filemanager.pro.R
@ -24,10 +24,10 @@ class ChangeSortingDialog(val activity: BaseSimpleActivity, val path: String = "
sorting_dialog_numeric_sorting.isChecked = currSorting and SORT_USE_NUMERIC_VALUE != 0
}
AlertDialog.Builder(activity)
activity.getAlertDialogBuilder()
.setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() }
.setNegativeButton(R.string.cancel, null)
.create().apply {
.apply {
activity.setupDialogStuff(view, this, R.string.sort_by)
}

View file

@ -1,10 +1,9 @@
package com.simplemobiletools.filemanager.pro.dialogs
import android.view.View
import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.extensions.beGone
import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.getAlertDialogBuilder
import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.commons.helpers.VIEW_TYPE_GRID
import com.simplemobiletools.commons.helpers.VIEW_TYPE_LIST
@ -36,16 +35,21 @@ class ChangeViewTypeDialog(val activity: BaseSimpleActivity, val path: String =
}
}
AlertDialog.Builder(activity)
activity.getAlertDialogBuilder()
.setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() }
.setNegativeButton(R.string.cancel, null)
.create().apply {
.apply {
activity.setupDialogStuff(view, this)
}
}
private fun dialogConfirmed() {
val viewType = if (view.change_view_type_dialog_radio.checkedRadioButtonId == view.change_view_type_dialog_radio_grid.id) VIEW_TYPE_GRID else VIEW_TYPE_LIST
val viewType = if (view.change_view_type_dialog_radio.checkedRadioButtonId == view.change_view_type_dialog_radio_grid.id) {
VIEW_TYPE_GRID
} else {
VIEW_TYPE_LIST
}
if (view.change_view_type_dialog_use_for_this_folder.isChecked) {
config.saveFolderViewType(this.path, viewType)
} else {

View file

@ -30,30 +30,30 @@ class CompressAsDialog(val activity: BaseSimpleActivity, val path: String, val c
}
}
AlertDialog.Builder(activity)
.setPositiveButton(R.string.ok, null)
.setNegativeButton(R.string.cancel, null)
.create().apply {
activity.setupDialogStuff(view, this, R.string.compress_as) {
showKeyboard(view.file_name)
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(View.OnClickListener {
val name = view.file_name.value
when {
name.isEmpty() -> activity.toast(R.string.empty_name)
name.isAValidFilename() -> {
val newPath = "$realPath/$name.zip"
if (activity.getDoesFilePathExist(newPath)) {
activity.toast(R.string.name_taken)
return@OnClickListener
}
dismiss()
callback(newPath)
activity.getAlertDialogBuilder()
.setPositiveButton(R.string.ok, null)
.setNegativeButton(R.string.cancel, null)
.apply {
activity.setupDialogStuff(view, this, R.string.compress_as) { alertDialog ->
alertDialog.showKeyboard(view.file_name)
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(View.OnClickListener {
val name = view.file_name.value
when {
name.isEmpty() -> activity.toast(R.string.empty_name)
name.isAValidFilename() -> {
val newPath = "$realPath/$name.zip"
if (activity.getDoesFilePathExist(newPath)) {
activity.toast(R.string.name_taken)
return@OnClickListener
}
else -> activity.toast(R.string.invalid_name)
alertDialog.dismiss()
callback(newPath)
}
})
}
else -> activity.toast(R.string.invalid_name)
}
})
}
}
}
}

View file

@ -15,13 +15,13 @@ class CreateNewItemDialog(val activity: SimpleActivity, val path: String, val ca
private val view = activity.layoutInflater.inflate(R.layout.dialog_create_new, null)
init {
AlertDialog.Builder(activity)
activity.getAlertDialogBuilder()
.setPositiveButton(R.string.ok, null)
.setNegativeButton(R.string.cancel, null)
.create().apply {
activity.setupDialogStuff(view, this, R.string.create_new) {
showKeyboard(view.item_name)
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(View.OnClickListener {
.apply {
activity.setupDialogStuff(view, this, R.string.create_new) { alertDialog ->
alertDialog.showKeyboard(view.item_name)
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(View.OnClickListener {
val name = view.item_name.value
if (name.isEmpty()) {
activity.toast(R.string.empty_name)
@ -33,11 +33,11 @@ class CreateNewItemDialog(val activity: SimpleActivity, val path: String, val ca
}
if (view.dialog_radio_group.checkedRadioButtonId == R.id.dialog_radio_directory) {
createDirectory(newPath, this) {
createDirectory(newPath, alertDialog) {
callback(it)
}
} else {
createFile(newPath, this) {
createFile(newPath, alertDialog) {
callback(it)
}
}

View file

@ -1,8 +1,8 @@
package com.simplemobiletools.filemanager.pro.dialogs
import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.extensions.beGone
import com.simplemobiletools.commons.extensions.getAlertDialogBuilder
import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.commons.helpers.TAB_FILES
import com.simplemobiletools.commons.helpers.TAB_RECENT_FILES
@ -34,10 +34,10 @@ class ManageVisibleTabsDialog(val activity: BaseSimpleActivity) {
view.findViewById<MyAppCompatCheckbox>(value).isChecked = showTabs and key != 0
}
AlertDialog.Builder(activity)
activity.getAlertDialogBuilder()
.setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() }
.setNegativeButton(R.string.cancel, null)
.create().apply {
.apply {
activity.setupDialogStuff(view, this)
}
}

View file

@ -8,8 +8,10 @@ import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.filemanager.pro.R
import kotlinx.android.synthetic.main.dialog_save_as.view.*
class SaveAsDialog(val activity: BaseSimpleActivity, var path: String, val hidePath: Boolean,
val callback: (path: String, filename: String) -> Unit) {
class SaveAsDialog(
val activity: BaseSimpleActivity, var path: String, val hidePath: Boolean,
val callback: (path: String, filename: String) -> Unit
) {
init {
if (path.isEmpty()) {
@ -45,44 +47,44 @@ class SaveAsDialog(val activity: BaseSimpleActivity, var path: String, val hideP
}
}
AlertDialog.Builder(activity)
.setPositiveButton(R.string.ok, null)
.setNegativeButton(R.string.cancel, null)
.create().apply {
activity.setupDialogStuff(view, this, R.string.save_as) {
showKeyboard(view.save_as_name)
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
val filename = view.save_as_name.value
val extension = view.save_as_extension.value
activity.getAlertDialogBuilder()
.setPositiveButton(R.string.ok, null)
.setNegativeButton(R.string.cancel, null)
.apply {
activity.setupDialogStuff(view, this, R.string.save_as) { alertDialog ->
alertDialog.showKeyboard(view.save_as_name)
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
val filename = view.save_as_name.value
val extension = view.save_as_extension.value
if (filename.isEmpty()) {
activity.toast(R.string.filename_cannot_be_empty)
return@setOnClickListener
}
if (filename.isEmpty()) {
activity.toast(R.string.filename_cannot_be_empty)
return@setOnClickListener
}
var newFilename = filename
if (extension.isNotEmpty()) {
newFilename += ".$extension"
}
var newFilename = filename
if (extension.isNotEmpty()) {
newFilename += ".$extension"
}
val newPath = "$realPath/$newFilename"
if (!newFilename.isAValidFilename()) {
activity.toast(R.string.filename_invalid_characters)
return@setOnClickListener
}
val newPath = "$realPath/$newFilename"
if (!newFilename.isAValidFilename()) {
activity.toast(R.string.filename_invalid_characters)
return@setOnClickListener
}
if (!hidePath && activity.getDoesFilePathExist(newPath)) {
val title = String.format(activity.getString(R.string.file_already_exists_overwrite), newFilename)
ConfirmationDialog(activity, title) {
callback(newPath, newFilename)
dismiss()
}
} else {
if (!hidePath && activity.getDoesFilePathExist(newPath)) {
val title = String.format(activity.getString(R.string.file_already_exists_overwrite), newFilename)
ConfirmationDialog(activity, title) {
callback(newPath, newFilename)
dismiss()
alertDialog.dismiss()
}
} else {
callback(newPath, newFilename)
alertDialog.dismiss()
}
}
}
}
}
}

View file

@ -1,23 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_screen"
android:id="@+id/main_coordinator"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.simplemobiletools.commons.views.MyViewPager
android:id="@+id/main_view_pager"
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/main_app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/main_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/color_primary"
app:menu="@menu/menu"
app:title="@string/app_launcher_name"
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
</com.google.android.material.appbar.AppBarLayout>
<RelativeLayout
android:id="@+id/main_screen"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/main_tabs_holder" />
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<com.google.android.material.tabs.TabLayout
android:id="@+id/main_tabs_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
app:tabIndicator="@null"
app:tabMinWidth="150dp"
app:tabRippleColor="@null" />
<com.simplemobiletools.commons.views.MyViewPager
android:id="@+id/main_view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/main_tabs_holder" />
</RelativeLayout>
<com.google.android.material.tabs.TabLayout
android:id="@+id/main_tabs_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
app:tabIndicator="@null"
app:tabMinWidth="150dp"
app:tabRippleColor="@null" />
</RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -1,358 +1,383 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/settings_scrollview"
android:id="@+id/settings_coordinator"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/settings_holder"
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/settings_app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_height="wrap_content">
<TextView
android:id="@+id/settings_color_customization_label"
style="@style/SettingsSectionLabelStyle"
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/settings_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/color_customization" />
android:layout_height="?attr/actionBarSize"
android:background="@color/color_primary"
app:title="@string/settings"
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/settings_nested_scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:scrollbars="none"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:id="@+id/settings_color_customization_holder"
android:id="@+id/settings_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_customize_colors_holder"
style="@style/SettingsHolderTextViewOneLinerStyle"
<TextView
android:id="@+id/settings_color_customization_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_all_corners">
android:text="@string/color_customization" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_customize_colors_label"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/settings_color_customization_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_customize_colors_holder"
style="@style/SettingsHolderTextViewOneLinerStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/customize_colors" />
android:background="@drawable/ripple_all_corners">
</RelativeLayout>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_customize_colors_label"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/customize_colors" />
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/settings_general_settings_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/general_settings" />
<LinearLayout
android:id="@+id/settings_general_settings_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_use_english_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_top_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_use_english"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/use_english_language" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_manage_favorites_holder"
style="@style/SettingsHolderTextViewOneLinerStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_background">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_manage_favorites"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manage_favorites" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_manage_tabs_holder"
style="@style/SettingsHolderTextViewOneLinerStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_background">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_manage_tabs"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manage_shown_tabs" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_change_date_time_format_holder"
style="@style/SettingsHolderTextViewOneLinerStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_background">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_change_date_time_format"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/change_date_and_time_format" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_font_size_holder"
style="@style/SettingsHolderTextViewStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_background">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_font_size_label"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/font_size" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_font_size"
style="@style/SettingsTextValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/settings_font_size_label"
tools:text="@string/medium" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_press_back_twice_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_bottom_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_press_back_twice"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/press_back_twice" />
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/settings_visibility_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/visibility" />
<LinearLayout
android:id="@+id/settings_visibility_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_show_hidden_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_all_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_show_hidden"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/show_hidden_items" />
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/settings_scrolling_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/scrolling" />
<LinearLayout
android:id="@+id/settings_scrolling_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_enable_pull_to_refresh_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_all_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_enable_pull_to_refresh"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/enable_pull_to_refresh" />
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/settings_file_operations_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/file_operations" />
<LinearLayout
android:id="@+id/settings_file_operations_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_keep_last_modified_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_top_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_keep_last_modified"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/keep_last_modified" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_skip_delete_confirmation_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_bottom_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_skip_delete_confirmation"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/skip_delete_confirmation" />
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/settings_security_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/security" />
<LinearLayout
android:id="@+id/settings_security_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_password_protection_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_top_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_password_protection"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/password_protect_hidden_items" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_app_password_protection_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_background">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_app_password_protection"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/password_protect_whole_app" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_file_deletion_password_protection_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_background">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_file_deletion_password_protection"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/password_protect_file_deletion" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_enable_root_access_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_bottom_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_enable_root_access"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/enable_root_access" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/settings_general_settings_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/general_settings" />
<LinearLayout
android:id="@+id/settings_general_settings_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_use_english_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_top_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_use_english"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/use_english_language" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_manage_favorites_holder"
style="@style/SettingsHolderTextViewOneLinerStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_background">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_manage_favorites"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manage_favorites" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_manage_tabs_holder"
style="@style/SettingsHolderTextViewOneLinerStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_background">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_manage_tabs"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manage_shown_tabs" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_change_date_time_format_holder"
style="@style/SettingsHolderTextViewOneLinerStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_background">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_change_date_time_format"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/change_date_and_time_format" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_font_size_holder"
style="@style/SettingsHolderTextViewStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_background">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_font_size_label"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/font_size" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_font_size"
style="@style/SettingsTextValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/settings_font_size_label"
tools:text="@string/medium" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_press_back_twice_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_bottom_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_press_back_twice"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/press_back_twice" />
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/settings_visibility_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/visibility" />
<LinearLayout
android:id="@+id/settings_visibility_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_show_hidden_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_all_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_show_hidden"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/show_hidden_items" />
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/settings_scrolling_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/scrolling" />
<LinearLayout
android:id="@+id/settings_scrolling_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_enable_pull_to_refresh_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_all_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_enable_pull_to_refresh"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/enable_pull_to_refresh" />
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/settings_file_operations_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/file_operations" />
<LinearLayout
android:id="@+id/settings_file_operations_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_keep_last_modified_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_top_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_keep_last_modified"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/keep_last_modified" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_skip_delete_confirmation_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_bottom_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_skip_delete_confirmation"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/skip_delete_confirmation" />
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/settings_security_label"
style="@style/SettingsSectionLabelStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/security" />
<LinearLayout
android:id="@+id/settings_security_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/medium_margin"
android:background="@drawable/section_holder_stroke"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_password_protection_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_top_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_password_protection"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/password_protect_hidden_items" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_app_password_protection_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_background">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_app_password_protection"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/password_protect_whole_app" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_file_deletion_password_protection_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_background">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_file_deletion_password_protection"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/password_protect_file_deletion" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_enable_root_access_holder"
style="@style/SettingsHolderCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_bottom_corners">
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/settings_enable_root_access"
style="@style/SettingsCheckboxStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/enable_root_access" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -5,5 +5,5 @@
android:id="@+id/decompress"
android:icon="@drawable/ic_decompress_vector"
android:title="@string/decompress"
app:showAsAction="ifRoom" />
app:showAsAction="always" />
</menu>

View file

@ -7,12 +7,12 @@
android:id="@+id/menu_search"
android:icon="@drawable/ic_search_vector"
android:title="@string/search"
app:showAsAction="ifRoom" />
app:showAsAction="always" />
<item
android:id="@+id/menu_save"
android:icon="@drawable/ic_save_vector"
android:title="@string/save_as"
app:showAsAction="ifRoom" />
app:showAsAction="always" />
<item
android:id="@+id/menu_open_with"
android:showAsAction="never"

View file

@ -5,5 +5,5 @@
android:id="@+id/add_favorite"
android:icon="@drawable/ic_plus_vector"
android:title="@string/add_favorites"
app:showAsAction="ifRoom" />
app:showAsAction="always" />
</menu>