WIP migrate to material design 3

This commit is contained in:
Julian Raufelder 2022-06-03 14:58:54 +02:00
parent 244dc0f8ba
commit c505f09ce0
No known key found for this signature in database
GPG Key ID: 17EE71F6634E381D
25 changed files with 183 additions and 259 deletions

View File

@ -1,21 +1,22 @@
package org.cryptomator.presentation.ui.adapter
import android.content.Context
import android.text.Editable
import android.text.TextWatcher
import android.view.View
import androidx.appcompat.content.res.AppCompatResources
import org.cryptomator.presentation.R
import org.cryptomator.presentation.model.SharedFileModel
import org.cryptomator.presentation.ui.adapter.SharedFilesAdapter.FileViewHolder
import org.cryptomator.presentation.util.FileIcon
import org.cryptomator.presentation.util.FileUtil
import org.cryptomator.util.Comparators
import java.util.HashSet
import javax.inject.Inject
import kotlinx.android.synthetic.main.item_shared_files.view.fileImage
import kotlinx.android.synthetic.main.item_shared_files.view.fileName
import kotlinx.android.synthetic.main.item_shared_files.view.til_file_name
class SharedFilesAdapter @Inject
constructor(private val fileUtil: FileUtil) : RecyclerViewBaseAdapter<SharedFileModel, SharedFilesAdapter.Callback, FileViewHolder>(Comparators.naturalOrder()) {
constructor(private val fileUtil: FileUtil, private val context: Context) : RecyclerViewBaseAdapter<SharedFileModel, SharedFilesAdapter.Callback, FileViewHolder>(Comparators.naturalOrder()) {
interface Callback {
@ -55,7 +56,7 @@ constructor(private val fileUtil: FileUtil) : RecyclerViewBaseAdapter<SharedFile
itemView.fileName.removeTextChangedListener(et_file_name_watcher)
}
val file = getItem(position)
itemView.fileImage.setImageResource(bindFileIcon(file.fileName))
itemView.til_file_name.startIconDrawable = AppCompatResources.getDrawable(context, FileIcon.fileIconFor(file.fileName, fileUtil).iconResource)
itemView.fileName.setText(file.fileName)
et_file_name_watcher = object : TextWatcher {
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {
@ -73,10 +74,6 @@ constructor(private val fileUtil: FileUtil) : RecyclerViewBaseAdapter<SharedFile
}
itemView.fileName.addTextChangedListener(et_file_name_watcher)
}
private fun bindFileIcon(fileName: String): Int {
return FileIcon.fileIconFor(fileName, fileUtil).iconResource
}
}
}

View File

@ -9,7 +9,7 @@ import androidx.appcompat.app.AlertDialog
import org.cryptomator.generator.Dialog
import org.cryptomator.presentation.R
import org.cryptomator.presentation.util.FileUtil
import kotlinx.android.synthetic.main.dialog_file_name.file_name
import kotlinx.android.synthetic.main.dialog_file_name.et_file_name
@Dialog(R.layout.dialog_file_name)
class FileNameDialog : BaseProgressErrorDialog<FileNameDialog.Callback>() {
@ -28,20 +28,20 @@ class FileNameDialog : BaseProgressErrorDialog<FileNameDialog.Callback>() {
createFileButton = dialog.getButton(android.app.Dialog.BUTTON_POSITIVE)
createFileButton?.setOnClickListener {
callback?.onCreateNewTextFileClicked(effectiveTextFileName())
onWaitForResponse(file_name)
onWaitForResponse(et_file_name)
}
dialog.setCanceledOnTouchOutside(false)
file_name.requestFocus()
et_file_name.requestFocus()
createFileButton?.let { button ->
file_name.nextFocusForwardId = button.id
et_file_name.nextFocusForwardId = button.id
}
}
}
private fun effectiveTextFileName(): String {
return if (file_name.text.toString().isEmpty()) //
return if (et_file_name.text.toString().isEmpty()) //
requireContext().getString(R.string.dialog_file_name_placeholder) else //
effectiveNewFileName(file_name.text.toString())
effectiveNewFileName(et_file_name.text.toString())
}
override fun setupDialog(builder: AlertDialog.Builder): android.app.Dialog {
@ -60,8 +60,8 @@ class FileNameDialog : BaseProgressErrorDialog<FileNameDialog.Callback>() {
}
override fun setupView() {
createFileButton?.let { registerOnEditorDoneActionAndPerformButtonClick(file_name) { it } }
file_name.addTextChangedListener(object : TextWatcher {
createFileButton?.let { registerOnEditorDoneActionAndPerformButtonClick(et_file_name) { it } }
et_file_name.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {}
override fun afterTextChanged(s: Editable) {
@ -75,6 +75,6 @@ class FileNameDialog : BaseProgressErrorDialog<FileNameDialog.Callback>() {
}
override fun enableViewAfterError(): View {
return file_name
return et_file_name
}
}

View File

@ -12,7 +12,7 @@ import androidx.core.content.ContextCompat
import androidx.preference.Preference
import androidx.preference.PreferenceCategory
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreferenceCompat
import androidx.preference.SwitchPreference
import org.cryptomator.presentation.BuildConfig
import org.cryptomator.presentation.R
import org.cryptomator.presentation.service.PhotoContentJob
@ -242,17 +242,17 @@ class SettingsFragment : PreferenceFragmentCompat() {
fun deactivateDebugMode() {
sharedPreferencesHandler.setDebugMode(false)
(findPreference(SharedPreferencesHandler.DEBUG_MODE) as SwitchPreferenceCompat?)?.isChecked = false
(findPreference(SharedPreferencesHandler.DEBUG_MODE) as SwitchPreference?)?.isChecked = false
}
fun disableAppWhenObscured() {
sharedPreferencesHandler.setDisableAppWhenObscured(true)
(findPreference(SharedPreferencesHandler.DISABLE_APP_WHEN_OBSCURED) as SwitchPreferenceCompat?)?.isChecked = true
(findPreference(SharedPreferencesHandler.DISABLE_APP_WHEN_OBSCURED) as SwitchPreference?)?.isChecked = true
}
fun secureScreen() {
sharedPreferencesHandler.setSecureScreen(true)
(findPreference(SharedPreferencesHandler.SECURE_SCREEN) as SwitchPreferenceCompat?)?.isChecked = true
(findPreference(SharedPreferencesHandler.SECURE_SCREEN) as SwitchPreference?)?.isChecked = true
}
private fun onSendErrorReportClicked() {
@ -289,7 +289,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
} else {
PhotoContentJob.cancelJob(activity().applicationContext)
}
(findPreference(SharedPreferencesHandler.PHOTO_UPLOAD) as SwitchPreferenceCompat?)?.isChecked = enabled
(findPreference(SharedPreferencesHandler.PHOTO_UPLOAD) as SwitchPreference?)?.isChecked = enabled
}
fun rootView(): View {

View File

@ -31,7 +31,6 @@
<Button
android:id="@+id/createVaultButton"
style="?android:textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"

View File

@ -5,7 +5,6 @@
android:layout_height="match_parent">
<LinearLayout
style="@style/BottomSheetBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"

View File

@ -5,7 +5,6 @@
android:layout_height="match_parent">
<LinearLayout
style="@style/BottomSheetBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"

View File

@ -5,7 +5,6 @@
android:layout_height="match_parent">
<LinearLayout
style="@style/BottomSheetBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"

View File

@ -5,7 +5,6 @@
android:layout_height="match_parent">
<LinearLayout
style="@style/BottomSheetBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"

View File

@ -5,7 +5,6 @@
android:layout_height="match_parent">
<LinearLayout
style="@style/BottomSheetBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"

View File

@ -5,7 +5,6 @@
android:layout_height="match_parent">
<LinearLayout
style="@style/BottomSheetBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -8,16 +9,11 @@
android:layout_height="match_parent"
android:padding="@dimen/activity_vertical_margin">
<LinearLayout
android:id="@+id/ll_folder"
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_folder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/node_folder" />
app:startIconDrawable="@drawable/node_folder">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_folder_name"
@ -26,20 +22,19 @@
android:imeOptions="actionDone|flagNoPersonalizedLearning"
android:inputType="text"
android:maxLines="1" />
</LinearLayout>
</com.google.android.material.textfield.TextInputLayout>
<include
layout="@layout/view_dialog_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_folder" />
android:layout_below="@id/til_folder" />
<include
layout="@layout/view_dialog_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_folder" />
android:layout_below="@id/til_folder" />
</RelativeLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<org.cryptomator.presentation.ui.layout.ObscuredAwareDialogCoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/dssialogRootView"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -20,17 +21,12 @@
android:layout_marginBottom="5dp"
android:text="@string/dialog_enter_license_content" />
<LinearLayout
android:id="@+id/ll_license"
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_license"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_message"
android:orientation="horizontal">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/ic_license_key" />
android:layout_below="@id/tv_message"
app:startIconDrawable="@drawable/ic_license_key">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_license"
@ -38,19 +34,19 @@
android:layout_height="wrap_content"
android:imeOptions="actionDone|flagNoPersonalizedLearning"
android:inputType="text" />
</LinearLayout>
</com.google.android.material.textfield.TextInputLayout>
<include
layout="@layout/view_dialog_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/til_password" />
android:layout_below="@+id/til_license" />
<include
layout="@layout/view_dialog_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_license" />
android:layout_below="@+id/til_license" />
</RelativeLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -8,25 +8,32 @@
android:layout_height="wrap_content"
android:padding="@dimen/global_padding">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/file_name"
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_file_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/dialog_file_name_placeholder"
android:imeOptions="flagNoPersonalizedLearning"
android:inputType="text"
android:maxLines="1" />
android:layout_height="wrap_content">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_file_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/dialog_file_name_hint"
android:text="@string/dialog_file_name_placeholder"
android:imeOptions="flagNoPersonalizedLearning"
android:inputType="text"
android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout>
<include
layout="@layout/view_dialog_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/file_name" />
android:layout_below="@+id/til_file_name" />
<include
layout="@layout/view_dialog_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/file_name" />
android:layout_below="@+id/til_file_name" />
</RelativeLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -8,25 +8,31 @@
android:layout_height="match_parent"
android:padding="@dimen/activity_vertical_margin">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_rename"
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_rename"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="flagNoPersonalizedLearning"
android:inputType="text"
android:maxLines="1"
android:selectAllOnFocus="true" />
android:layout_height="wrap_content">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_rename"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="flagNoPersonalizedLearning"
android:inputType="text"
android:maxLines="1"
android:selectAllOnFocus="true" />
</com.google.android.material.textfield.TextInputLayout>
<include
layout="@layout/view_dialog_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/et_rename" />
android:layout_below="@+id/til_rename" />
<include
layout="@layout/view_dialog_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/et_rename" />
android:layout_below="@+id/til_rename" />
</RelativeLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -52,7 +52,6 @@
<Button
android:id="@+id/createVaultButton"
style="?android:textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"

View File

@ -110,7 +110,6 @@
<Button
android:id="@+id/createCloudButton"
style="?android:textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"

View File

@ -63,7 +63,6 @@
<Button
android:id="@+id/createCloudButton"
style="?android:textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"

View File

@ -43,7 +43,6 @@
<Button
android:id="@+id/chooseFolderLocation"
style="@style/Widget.AppCompat.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"

View File

@ -1,35 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="48dp">
android:layout_height="64dp">
<ImageView
android:id="@+id/fileImage"
android:layout_width="@dimen/thumbnail_size"
android:layout_height="@dimen/thumbnail_size"
android:layout_centerVertical="true"
android:layout_marginStart="16dp"
android:src="@drawable/node_file_image" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/fileName"
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_file_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_toEndOf="@+id/fileImage"
android:ellipsize="middle"
android:imeOptions="flagNoPersonalizedLearning"
android:inputType="text"
android:singleLine="true" />
<!-- using android:singleLine to fix https://code.google.com/p/android/issues/detail?id=33868 -->
app:startIconDrawable="@drawable/node_file_image"
app:startIconTint="@null">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/fileName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:ellipsize="middle"
android:imeOptions="flagNoPersonalizedLearning"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:layout_marginStart="16dp"
android:layout_toEndOf="@+id/fileImage"
android:layout_toEndOf="@+id/til_file_name"
android:background="@color/list_divider" />
</RelativeLayout>

View File

@ -1,13 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.appbar.MaterialToolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
android:theme="@style/Toolbar.Theme"
app:layout_collapseMode="pin"
app:popupTheme="@style/Theme.AppCompat.DayNight.NoActionBar"
app:subtitleTextAppearance="@style/Toolbar.SubtitleText"
app:titleTextAppearance="@style/Toolbar.TitleText" />
app:layout_collapseMode="pin" />

View File

@ -1,124 +1,16 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="AppTheme.Base" />
<style name="Theme.AppCompat.DayNight" parent="Theme.AppCompat" />
<style name="AppTheme.Base" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorPrimary</item>
<item name="alertDialogTheme">@style/AlertDialogCustom</item>
<item name="android:windowAnimationStyle">@style/CustomActivityAnimation</item>
<item name="preferenceTheme">@style/PreferenceTheme</item>
<item name="preferenceStyle">@style/PreferenceTheme</item>
<item name="android:fontFamily">@font/open_sans</item>
<style name="AppTheme.Snackbar" parent="Widget.Material3.Snackbar">
<item name="materialThemeOverlay">@style/Snackbar</item>
<item name="backgroundTint">@color/colorBlack</item>
</style>
<style name="AppTheme.Starting" parent="Theme.SplashScreen.IconBackground">
<item name="windowSplashScreenBackground">@color/colorPrimary</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher_foreground</item>
<item name="windowSplashScreenIconBackgroundColor">@color/material_grey_850</item>
<item name="postSplashScreenTheme">@style/AppTheme</item>
<style name="Snackbar" parent="">
<item name="backgroundTint">@color/colorBlack</item>
</style>
<style name="PreferenceTheme" parent="PreferenceThemeOverlay">
<item name="android:textColor">@color/textColorWhite</item>
<item name="android:textColorPrimary">@color/colorPrimary</item>
<item name="android:textColorSecondary">@color/textColorLight</item>
</style>
<style name="AlertDialogCustom" parent="Theme.AppCompat.DayNight.Dialog.Alert">
<item name="colorAccent">@color/colorPrimary</item>
</style>
<style name="Toolbar.Theme" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="colorAccent">@color/textColorWhite</item>
</style>
<style name="AppTheme.Hint">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_centerVertical">true</item>
<item name="android:layout_centerHorizontal">true</item>
<item name="android:layout_gravity">center</item>
</style>
<style name="AppTheme.ProgressBar">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_centerInParent">true</item>
<item name="android:layout_gravity">center</item>
<item name="android:visibility">visible</item>
</style>
<style name="AppTheme.RetryButton">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_centerVertical">true</item>
<item name="android:layout_centerHorizontal">true</item>
<item name="android:layout_gravity">center</item>
</style>
<style name="AppTheme.ListItem">
<item name="android:gravity">center_vertical</item>
<item name="android:layout_height">48dp</item>
<item name="android:textSize">16sp</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_marginStart">16dp</item>
<item name="android:layout_marginEnd">16dp</item>
<item name="android:paddingBottom">16dp</item>
<item name="android:drawablePadding">32dp</item>
<item name="android:clickable">true</item>
<item name="android:focusable">true</item>
</style>
<style name="AppTheme.ListItemDarkTextColor">
<item name="android:textColor">@color/textColorPrimary</item>
</style>
<style name="AppTheme.ListItemLightTextColor">
<item name="android:textColor">@color/textColorLight</item>
</style>
<style name="BottomSheetBackground" parent="AppTheme">
<item name="android:background">@color/colorGray</item>
</style>
<style name="Toolbar.TitleText" parent="TextAppearance.Widget.AppCompat.Toolbar.Title">
<item name="android:textSize">20sp</item>
<item name="android:textColor">@color/textColorWhite</item>
<item name="android:fontFamily">@font/quicksand_medium</item>
</style>
<style name="Toolbar.SubtitleText" parent="TextAppearance.Widget.AppCompat.Toolbar.Subtitle">
<item name="android:textSize">14sp</item>
<item name="android:fontFamily">@font/quicksand_medium</item>
</style>
<style name="CustomActivityAnimation" parent="@android:style/Animation.Activity">
<item name="android:activityOpenEnterAnimation">@anim/slide_in_right</item>
<item name="android:activityOpenExitAnimation">@anim/slide_out_left</item>
<item name="android:activityCloseEnterAnimation">@anim/slide_in_left</item>
<item name="android:activityCloseExitAnimation">@anim/slide_out_right</item>
</style>
<style name="Theme.Transparent" parent="@style/Theme.AppCompat.DayNight.NoActionBar">
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<!-- windowIsTranslucent=false due to https://issuetracker.google.com/issues/68454482 see #467 -->
<item name="android:windowIsTranslucent">false</item>
<item name="android:windowAnimationStyle">@null</item>
</style>
<style name="FullscreenTheme" parent="AppTheme">
<item name="android:windowBackground">@null</item>
<style name="ModalBottomSheet" parent="Widget.Material3.BottomSheet.Modal">
<item name="backgroundTint">@color/colorBlack</item>
</style>
</resources>

View File

@ -4,6 +4,8 @@
<color name="colorPrimaryTransparent">#66CC68</color>
<color name="colorPrimaryDark">#407F41</color>
<color name="colorSecondary">#008A7B</color>
<color name="textColorPrimary">#222222</color>
<color name="textColorWhite">#F7F7F7</color>
<color name="textColorLight">#9E9E9E</color>

View File

@ -381,6 +381,7 @@
<string name="dialog_unsaved_changes_save" translatable="false">@string/screen_share_files_save_button_text</string>
<string name="dialog_file_name_title" translatable="false">@string/screen_file_browser_action_create_new_text_file</string>
<string name="dialog_file_name_hint">File name</string>
<string name="dialog_file_name_create" translatable="false">@string/screen_enter_vault_name_button_text</string>
<string name="dialog_file_name_cancel" translatable="false">@string/dialog_button_cancel</string>
<string name="dialog_file_name_placeholder">text.txt</string>

View File

@ -3,20 +3,27 @@
<!-- Base application theme. -->
<style name="AppTheme" parent="AppTheme.Base" />
<style name="Theme.AppCompat.DayNight" parent="Theme.AppCompat.Light" />
<style name="Theme.AppCompat.DayNight" parent="Theme.Material3.Light" />
<style name="AppTheme.Base" parent="Theme.AppCompat.DayNight.NoActionBar">
<style name="AppTheme.Base" parent="Theme.Material3.DayNight.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimary</item>
<item name="colorAccent">@color/colorPrimaryTransparent</item>
<item name="colorOnPrimary">@color/colorWhite</item>
<item name="colorError">@color/textColorError</item>
<item name="android:textColorHighlight">@color/colorPrimaryTransparent</item>
<item name="alertDialogTheme">@style/AlertDialogCustom</item>
<item name="android:windowAnimationStyle">@style/CustomActivityAnimation</item>
<item name="preferenceTheme">@style/PreferenceTheme</item>
<item name="preferenceStyle">@style/PreferenceTheme</item>
<item name="android:fontFamily">@font/open_sans</item>
<item name="floatingActionButtonStyle">@style/AppTheme.FloatingActionButton</item>
<item name="toolbarStyle">@style/AppTheme.Toolbar</item>
<item name="snackbarStyle">@style/AppTheme.Snackbar</item>
<item name="snackbarButtonStyle">@style/AppTheme.SnackbarButton</item>
<item name="snackbarTextViewStyle">@style/AppTheme.SnackbarTextview</item>
<item name="preferenceTheme">@style/PreferenceTheme</item>
<item name="bottomSheetDialogTheme">@style/ModalBottomSheetDialog</item>
</style>
<style name="AppTheme.Starting" parent="Theme.SplashScreen.IconBackground">
@ -26,20 +33,6 @@
<item name="postSplashScreenTheme">@style/AppTheme</item>
</style>
<style name="PreferenceTheme" parent="PreferenceThemeOverlay">
<item name="android:textColor">@color/textColorPrimary</item>
<item name="android:textColorPrimary">@color/colorPrimary</item>
<item name="android:textColorSecondary">@color/textColorLight</item>
</style>
<style name="AlertDialogCustom" parent="Theme.AppCompat.DayNight.Dialog.Alert">
<item name="colorAccent">@color/colorPrimary</item>
</style>
<style name="Toolbar.Theme" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="colorAccent">@color/textColorWhite</item>
</style>
<style name="AppTheme.Hint">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
@ -85,17 +78,69 @@
<item name="android:textColor">@color/textColorLight</item>
</style>
<style name="BottomSheetBackground" parent="AppTheme" />
<style name="Toolbar.TitleText" parent="TextAppearance.Widget.AppCompat.Toolbar.Title">
<item name="android:textSize">20sp</item>
<item name="android:textColor">@color/textColorWhite</item>
<item name="android:fontFamily">@font/quicksand_medium</item>
<style name="AppTheme.Toolbar" parent="Widget.Material3.Toolbar">
<item name="materialThemeOverlay">@style/Toolbar</item>
<item name="titleTextAppearance">@style/Toolbar.TitleText</item>
<item name="subtitleTextAppearance">@style/Toolbar.SubtitleText</item>
</style>
<style name="Toolbar.SubtitleText" parent="TextAppearance.Widget.AppCompat.Toolbar.Subtitle">
<item name="android:textSize">14sp</item>
<style name="Toolbar" parent="">
<item name="colorOnSurface">@color/colorWhite</item>
<item name="colorOnPrimary">@color/colorWhite</item>
<item name="colorOnSurfaceVariant">@color/colorWhite</item>
<item name="colorControlNormal">@color/colorWhite</item>
<item name="android:editTextColor">@color/colorWhite</item>
</style>
<style name="Toolbar.TitleText" parent="TextAppearance.Material3.TitleLarge">
<item name="fontFamily">@font/quicksand_medium</item>
<item name="android:fontFamily">@font/quicksand_medium</item>
<item name="android:textColor">@color/colorWhite</item>
</style>
<style name="Toolbar.SubtitleText" parent="TextAppearance.Material3.TitleMedium">
<item name="fontFamily">@font/quicksand_medium</item>
<item name="android:fontFamily">@font/quicksand_medium</item>
<item name="android:textColor">@color/colorWhite</item>
</style>
<style name="AppTheme.Snackbar" parent="Widget.Material3.Snackbar">
<item name="materialThemeOverlay">@style/Snackbar</item>
<item name="backgroundTint">@color/colorWhite</item>
</style>
<style name="Snackbar" parent="">
<item name="backgroundTint">@color/colorWhite</item>
</style>
<style name="AppTheme.SnackbarButton" parent="Widget.Material3.Button.TextButton.Snackbar">
<item name="android:textColor">@color/colorPrimary</item>
</style>
<style name="AppTheme.SnackbarTextview" parent="Widget.Material3.Snackbar.TextView">
<item name="android:textColor">@color/textColorPrimary</item>
</style>
<style name="AppTheme.FloatingActionButton" parent="Widget.Material3.FloatingActionButton.Primary">
<item name="materialThemeOverlay">@style/FloatingActionButton</item>
</style>
<style name="FloatingActionButton" parent="">
<item name="colorContainer">@color/colorPrimary</item>
<item name="colorOnContainer">@color/colorWhite</item>
</style>
<style name="PreferenceTheme" parent="@style/BasePreferenceThemeOverlay">
<item name="preferenceCategoryTitleTextColor">@color/colorPrimary</item>
<item name="android:textColor">@color/textColorPrimary</item>
</style>
<style name="ModalBottomSheetDialog" parent="ThemeOverlay.Material3.BottomSheetDialog">
<item name="bottomSheetStyle">@style/ModalBottomSheet</item>
</style>
<style name="ModalBottomSheet" parent="Widget.Material3.BottomSheet.Modal">
<item name="backgroundTint">@color/colorWhite</item>
</style>
<style name="CustomActivityAnimation" parent="@android:style/Animation.Activity">
@ -105,7 +150,7 @@
<item name="android:activityCloseExitAnimation">@anim/slide_out_right</item>
</style>
<style name="Theme.Transparent" parent="@style/Theme.AppCompat.DayNight.NoActionBar">
<style name="Theme.Transparent" parent="@style/Theme.Material3.DayNight.NoActionBar">
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>

View File

@ -24,13 +24,13 @@
android:key="biometricAuthentication"
android:title="@string/screen_settings_biometric_auth" />
<androidx.preference.SwitchPreferenceCompat
<SwitchPreference
android:defaultValue="true"
android:key="disableAppWhenObscured"
android:summary="@string/screen_settings_block_app_when_obscured_summary"
android:title="@string/screen_settings_block_app_when_obscured" />
<androidx.preference.SwitchPreferenceCompat
<SwitchPreference
android:defaultValue="true"
android:key="secureScreen"
android:summary="@string/screen_settings_secure_screen_summary"
@ -54,13 +54,13 @@
<PreferenceCategory android:title="@string/screen_settings_section_search">
<androidx.preference.SwitchPreferenceCompat
<SwitchPreference
android:defaultValue="false"
android:key="liveSearch"
android:summary="@string/screen_settings_live_search_summary"
android:title="@string/screen_settings_live_search" />
<androidx.preference.SwitchPreferenceCompat
<SwitchPreference
android:defaultValue="false"
android:key="globSearch"
android:summary="@string/screen_settings_glob_search_summary"
@ -72,7 +72,7 @@
android:key="@string/screen_settings_section_auto_lock"
android:title="@string/screen_settings_section_auto_lock">
<androidx.preference.SwitchPreferenceCompat
<SwitchPreference
android:defaultValue="true"
android:key="lockOnScreenOff"
android:title="@string/screen_settings_auto_lock_on_screen_lock" />
@ -92,24 +92,24 @@
android:key="@string/screen_settings_section_auto_photo_upload"
android:title="@string/screen_settings_section_auto_photo_upload">
<androidx.preference.SwitchPreferenceCompat
<SwitchPreference
android:defaultValue="false"
android:key="photoUpload"
android:summary="@string/screen_settings_section_auto_photo_upload_toggle_summary"
android:title="@string/screen_settings_section_auto_photo_upload_toggle" />
<androidx.preference.SwitchPreferenceCompat
<SwitchPreference
android:defaultValue="true"
android:key="photoUploadInstant"
android:summary="@string/screen_settings_section_auto_photo_upload_toggle_instant_upload_summary"
android:title="@string/screen_settings_section_auto_photo_upload_toggle_instant_upload" />
<androidx.preference.SwitchPreferenceCompat
<SwitchPreference
android:defaultValue="true"
android:key="photoUploadOnlyUsingWifi"
android:title="@string/screen_settings_section_auto_photo_upload_only_wifi_toggle" />
<androidx.preference.SwitchPreferenceCompat
<SwitchPreference
android:defaultValue="false"
android:key="photoUploadIncludingVideos"
android:title="@string/screen_settings_section_auto_photo_upload_including_videos" />
@ -122,7 +122,7 @@
<PreferenceCategory android:title="@string/screen_settings_lru_cache">
<androidx.preference.SwitchPreferenceCompat
<SwitchPreference
android:defaultValue="true"
android:key="lruCache"
android:summary="@string/screen_settings_lru_cache_toggle_summary"
@ -155,7 +155,7 @@
android:data="@string/screen_settings_support_uri" />
</androidx.preference.PreferenceScreen>
<androidx.preference.SwitchPreferenceCompat
<SwitchPreference
android:defaultValue="false"
android:key="debugMode"
android:title="@string/screen_settings_debug_mode_label" />
@ -168,13 +168,13 @@
<PreferenceCategory android:title="@string/screen_settings_advanced_settings">
<androidx.preference.SwitchPreferenceCompat
<SwitchPreference
android:defaultValue="true"
android:key="backgroundUnlockPreparation"
android:summary="@string/screen_settings_background_unlock_preparation_label_summary"
android:title="@string/screen_settings_background_unlock_preparation_label" />
<androidx.preference.SwitchPreferenceCompat
<SwitchPreference
android:defaultValue="false"
android:key="keepUnlockedWhileEditing"
android:summary="@string/screen_settings_keep_unlocked_while_editing_files_summary"