fix: Lot of styles bugs

This commit is contained in:
J-Jamet 2023-06-26 18:03:36 +02:00
parent 0850b19aec
commit 2da58f5899
59 changed files with 442 additions and 216 deletions

View file

@ -33,7 +33,6 @@ android {
buildTypes { buildTypes {
release { release {
minifyEnabled = false minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
} }

View file

@ -41,13 +41,13 @@ import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.activity.viewModels import androidx.activity.viewModels
import androidx.annotation.RequiresApi import androidx.annotation.RequiresApi
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.coordinatorlayout.widget.CoordinatorLayout import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.core.widget.NestedScrollView import androidx.core.widget.NestedScrollView
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.activities.dialogs.ColorPickerDialogFragment import com.kunzisoft.keepass.activities.dialogs.ColorPickerDialogFragment
@ -711,7 +711,7 @@ class EntryEditActivity : DatabaseLockActivity(),
private fun onApprovedBackPressed(approved: () -> Unit) { private fun onApprovedBackPressed(approved: () -> Unit) {
if (!backPressedAlreadyApproved) { if (!backPressedAlreadyApproved) {
AlertDialog.Builder(this) MaterialAlertDialogBuilder(this)
.setMessage(R.string.discard_changes) .setMessage(R.string.discard_changes)
.setNegativeButton(android.R.string.cancel, null) .setNegativeButton(android.R.string.cancel, null)
.setPositiveButton(R.string.discard) { _, _ -> .setPositiveButton(R.string.discard) { _, _ ->

View file

@ -5,8 +5,8 @@ import android.graphics.Color
import android.os.Bundle import android.os.Bundle
import android.widget.CompoundButton import android.widget.CompoundButton
import androidx.annotation.ColorInt import androidx.annotation.ColorInt
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.activityViewModels import androidx.fragment.app.activityViewModels
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.androidclearchroma.view.ChromaColorView import com.kunzisoft.androidclearchroma.view.ChromaColorView
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.viewmodels.ColorPickerViewModel import com.kunzisoft.keepass.viewmodels.ColorPickerViewModel
@ -53,7 +53,7 @@ class ColorPickerDialogFragment : DatabaseDialogFragment() {
enableSwitchView.isChecked = true enableSwitchView.isChecked = true
} }
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
builder.setView(root) builder.setView(root)
.setPositiveButton(android.R.string.ok) { _, _ -> .setPositiveButton(android.R.string.ok) { _, _ ->
val color: Int? = if (enableSwitchView.isChecked) val color: Int? = if (enableSwitchView.isChecked)

View file

@ -22,7 +22,7 @@ package com.kunzisoft.keepass.activities.dialogs
import android.app.Dialog import android.app.Dialog
import android.os.Bundle import android.os.Bundle
import android.text.SpannableStringBuilder import android.text.SpannableStringBuilder
import androidx.appcompat.app.AlertDialog import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.model.SnapFileDatabaseInfo import com.kunzisoft.keepass.model.SnapFileDatabaseInfo
import com.kunzisoft.keepass.utils.getParcelableCompat import com.kunzisoft.keepass.utils.getParcelableCompat
@ -46,7 +46,7 @@ class DatabaseChangedDialogFragment : DatabaseDialogFragment() {
if (oldSnapFileDatabaseInfo != null && newSnapFileDatabaseInfo != null) { if (oldSnapFileDatabaseInfo != null && newSnapFileDatabaseInfo != null) {
// Use the Builder class for convenient dialog construction // Use the Builder class for convenient dialog construction
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
val stringBuilder = SpannableStringBuilder() val stringBuilder = SpannableStringBuilder()
if (newSnapFileDatabaseInfo.exists) { if (newSnapFileDatabaseInfo.exists) {

View file

@ -21,8 +21,8 @@ package com.kunzisoft.keepass.activities.dialogs
import android.app.Dialog import android.app.Dialog
import android.os.Bundle import android.os.Bundle
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.activityViewModels import androidx.fragment.app.activityViewModels
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.database.element.node.Node import com.kunzisoft.keepass.database.element.node.Node
import com.kunzisoft.keepass.viewmodels.NodesViewModel import com.kunzisoft.keepass.viewmodels.NodesViewModel
@ -44,7 +44,7 @@ class DeleteNodesDialogFragment : DatabaseDialogFragment() {
} }
activity?.let { activity -> activity?.let { activity ->
// Use the Builder class for convenient dialog construction // Use the Builder class for convenient dialog construction
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
builder.setMessage(if (recycleBin) builder.setMessage(if (recycleBin)
getString(R.string.warning_empty_recycle_bin) getString(R.string.warning_empty_recycle_bin)

View file

@ -21,8 +21,8 @@ package com.kunzisoft.keepass.activities.dialogs
import android.app.Dialog import android.app.Dialog
import android.os.Bundle import android.os.Bundle
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
class DuplicateUuidDialog : DialogFragment() { class DuplicateUuidDialog : DialogFragment() {
@ -32,7 +32,7 @@ class DuplicateUuidDialog : DialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
activity?.let { activity -> activity?.let { activity ->
// Use the Builder class for convenient dialog construction // Use the Builder class for convenient dialog construction
val builder = AlertDialog.Builder(activity).apply { val builder = MaterialAlertDialogBuilder(activity).apply {
val message = getString(R.string.contains_duplicate_uuid) + val message = getString(R.string.contains_duplicate_uuid) +
"\n\n" + getString(R.string.contains_duplicate_uuid_procedure) "\n\n" + getString(R.string.contains_duplicate_uuid_procedure)
setMessage(message) setMessage(message)

View file

@ -31,6 +31,7 @@ import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.annotation.StringRes import androidx.annotation.StringRes
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textfield.TextInputLayout import com.google.android.material.textfield.TextInputLayout
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.database.element.Field import com.kunzisoft.keepass.database.element.Field
@ -87,7 +88,7 @@ class EntryCustomFieldDialogFragment: DatabaseDialogFragment() {
customFieldDeleteButton?.visibility = View.GONE customFieldDeleteButton?.visibility = View.GONE
} }
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
builder.setView(root) builder.setView(root)
.setPositiveButton(android.R.string.ok, null) .setPositiveButton(android.R.string.ok, null)
.setNegativeButton(android.R.string.cancel) { _, _ -> } .setNegativeButton(android.R.string.cancel) { _, _ -> }

View file

@ -23,8 +23,8 @@ import android.app.Dialog
import android.os.Bundle import android.os.Bundle
import android.widget.Button import android.widget.Button
import android.widget.TextView import android.widget.TextView
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.utils.UriUtil.openUrl import com.kunzisoft.keepass.utils.UriUtil.openUrl
@ -32,7 +32,7 @@ class FileManagerDialogFragment : DialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
activity?.let { activity -> activity?.let { activity ->
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
// Get the layout inflater // Get the layout inflater
val root = activity.layoutInflater.inflate(R.layout.fragment_browser_install, null) val root = activity.layoutInflater.inflate(R.layout.fragment_browser_install, null)
builder.setView(root) builder.setView(root)

View file

@ -24,8 +24,8 @@ import android.content.Context
import android.net.Uri import android.net.Uri
import android.os.Bundle import android.os.Bundle
import android.text.SpannableStringBuilder import android.text.SpannableStringBuilder
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.utils.getParcelableCompat import com.kunzisoft.keepass.utils.getParcelableCompat
@ -55,7 +55,7 @@ class FileTooBigDialogFragment : DialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
activity?.let { activity -> activity?.let { activity ->
// Use the Builder class for convenient dialog construction // Use the Builder class for convenient dialog construction
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
builder.setMessage(SpannableStringBuilder().apply { builder.setMessage(SpannableStringBuilder().apply {
append(getString(R.string.warning_file_too_big)) append(getString(R.string.warning_file_too_big))
append("\n\n") append("\n\n")

View file

@ -26,18 +26,18 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.appcompat.app.AlertDialog
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.adapters.TagsAdapter import com.kunzisoft.keepass.adapters.TagsAdapter
import com.kunzisoft.keepass.database.ContextualDatabase import com.kunzisoft.keepass.database.ContextualDatabase
import com.kunzisoft.keepass.database.element.icon.IconImage import com.kunzisoft.keepass.database.element.icon.IconImage
import com.kunzisoft.keepass.model.GroupInfo import com.kunzisoft.keepass.model.GroupInfo
import com.kunzisoft.keepass.settings.PreferencesUtil import com.kunzisoft.keepass.settings.PreferencesUtil
import com.kunzisoft.keepass.utils.getParcelableCompat
import com.kunzisoft.keepass.utils.TimeUtil.getDateTimeString import com.kunzisoft.keepass.utils.TimeUtil.getDateTimeString
import com.kunzisoft.keepass.utils.UuidUtil import com.kunzisoft.keepass.utils.UuidUtil
import com.kunzisoft.keepass.utils.getParcelableCompat
import com.kunzisoft.keepass.view.DateTimeFieldView import com.kunzisoft.keepass.view.DateTimeFieldView
class GroupDialogFragment : DatabaseDialogFragment() { class GroupDialogFragment : DatabaseDialogFragment() {
@ -165,7 +165,7 @@ class GroupDialogFragment : DatabaseDialogFragment() {
} }
} }
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
builder.setView(root) builder.setView(root)
.setPositiveButton(android.R.string.ok){ _, _ -> .setPositiveButton(android.R.string.ok){ _, _ ->
// Do nothing // Do nothing

View file

@ -29,6 +29,7 @@ import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.activityViewModels import androidx.fragment.app.activityViewModels
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textfield.TextInputLayout import com.google.android.material.textfield.TextInputLayout
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.activities.dialogs.GroupEditDialogFragment.EditGroupDialogAction.CREATION import com.kunzisoft.keepass.activities.dialogs.GroupEditDialogFragment.EditGroupDialogAction.CREATION
@ -196,7 +197,7 @@ class GroupEditDialogFragment : DatabaseDialogFragment() {
mGroupEditViewModel.requestDateTimeSelection(dateInstant) mGroupEditViewModel.requestDateTimeSelection(dateInstant)
} }
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
builder.setView(root) builder.setView(root)
.setPositiveButton(android.R.string.ok, null) .setPositiveButton(android.R.string.ok, null)
.setNegativeButton(android.R.string.cancel) { _, _ -> .setNegativeButton(android.R.string.cancel) { _, _ ->

View file

@ -23,8 +23,8 @@ import android.app.Dialog
import android.os.Bundle import android.os.Bundle
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.activityViewModels import androidx.fragment.app.activityViewModels
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textfield.TextInputLayout import com.google.android.material.textfield.TextInputLayout
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.database.ContextualDatabase import com.kunzisoft.keepass.database.ContextualDatabase
@ -73,7 +73,7 @@ class IconEditDialogFragment : DatabaseDialogFragment() {
} }
} }
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
builder.setView(root) builder.setView(root)
.setPositiveButton(android.R.string.ok) { _, _ -> .setPositiveButton(android.R.string.ok) { _, _ ->
retrieveIconInfoFromViews() retrieveIconInfoFromViews()

View file

@ -24,12 +24,12 @@ import android.content.Context
import android.net.Uri import android.net.Uri
import android.os.Bundle import android.os.Bundle
import android.widget.TextView import android.widget.TextView
import androidx.appcompat.app.AlertDialog import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.activities.helpers.ExternalFileHelper import com.kunzisoft.keepass.activities.helpers.ExternalFileHelper
import com.kunzisoft.keepass.database.MainCredential import com.kunzisoft.keepass.database.MainCredential
import com.kunzisoft.keepass.utils.getParcelableCompat
import com.kunzisoft.keepass.utils.UriUtil.getDocumentFile import com.kunzisoft.keepass.utils.UriUtil.getDocumentFile
import com.kunzisoft.keepass.utils.getParcelableCompat
import com.kunzisoft.keepass.view.MainCredentialView import com.kunzisoft.keepass.view.MainCredentialView
class MainCredentialDialogFragment : DatabaseDialogFragment() { class MainCredentialDialogFragment : DatabaseDialogFragment() {
@ -69,7 +69,7 @@ class MainCredentialDialogFragment : DatabaseDialogFragment() {
databaseUri = getParcelableCompat(KEY_ASK_CREDENTIAL_URI) databaseUri = getParcelableCompat(KEY_ASK_CREDENTIAL_URI)
} }
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
val root = activity.layoutInflater.inflate(R.layout.fragment_main_credential, null) val root = activity.layoutInflater.inflate(R.layout.fragment_main_credential, null)
mainCredentialView = root.findViewById(R.id.main_credential_view) mainCredentialView = root.findViewById(R.id.main_credential_view)

View file

@ -23,8 +23,8 @@ import android.app.Dialog
import android.content.Context import android.content.Context
import android.net.Uri import android.net.Uri
import android.os.Bundle import android.os.Bundle
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.database.MainCredential import com.kunzisoft.keepass.database.MainCredential
import com.kunzisoft.keepass.utils.getParcelableCompat import com.kunzisoft.keepass.utils.getParcelableCompat
@ -54,7 +54,7 @@ class PasswordEncodingDialogFragment : DialogFragment() {
val mainCredential: MainCredential = savedInstanceState?.getParcelableCompat(MAIN_CREDENTIAL) ?: MainCredential() val mainCredential: MainCredential = savedInstanceState?.getParcelableCompat(MAIN_CREDENTIAL) ?: MainCredential()
activity?.let { activity -> activity?.let { activity ->
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
builder.setMessage(activity.getString(R.string.warning_password_encoding)).setTitle(R.string.warning) builder.setMessage(activity.getString(R.string.warning_password_encoding)).setTitle(R.string.warning)
builder.setPositiveButton(android.R.string.ok) { _, _ -> builder.setPositiveButton(android.R.string.ok) { _, _ ->
mListener?.onPasswordEncodingValidateListener( mListener?.onPasswordEncodingValidateListener(

View file

@ -22,10 +22,10 @@ package com.kunzisoft.keepass.activities.dialogs
import android.app.Dialog import android.app.Dialog
import android.os.Bundle import android.os.Bundle
import android.text.SpannableStringBuilder import android.text.SpannableStringBuilder
import androidx.appcompat.app.AlertDialog
import androidx.core.text.HtmlCompat import androidx.core.text.HtmlCompat
import androidx.core.text.HtmlCompat.FROM_HTML_MODE_LEGACY import androidx.core.text.HtmlCompat.FROM_HTML_MODE_LEGACY
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.BuildConfig import com.kunzisoft.keepass.BuildConfig
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.utils.UriUtil.openUrl import com.kunzisoft.keepass.utils.UriUtil.openUrl
@ -38,7 +38,7 @@ class ProFeatureDialogFragment : DialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
activity?.let { activity -> activity?.let { activity ->
// Use the Builder class for convenient dialog construction // Use the Builder class for convenient dialog construction
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
val stringBuilder = SpannableStringBuilder() val stringBuilder = SpannableStringBuilder()
if (BuildConfig.CLOSED_STORE) { if (BuildConfig.CLOSED_STORE) {

View file

@ -24,7 +24,7 @@ import android.content.Context
import android.net.Uri import android.net.Uri
import android.os.Bundle import android.os.Bundle
import android.text.SpannableStringBuilder import android.text.SpannableStringBuilder
import androidx.appcompat.app.AlertDialog import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.database.element.Attachment import com.kunzisoft.keepass.database.element.Attachment
import com.kunzisoft.keepass.utils.getParcelableCompat import com.kunzisoft.keepass.utils.getParcelableCompat
@ -55,7 +55,7 @@ class ReplaceFileDialogFragment : DatabaseDialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
activity?.let { activity -> activity?.let { activity ->
// Use the Builder class for convenient dialog construction // Use the Builder class for convenient dialog construction
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
builder.setMessage(SpannableStringBuilder().apply { builder.setMessage(SpannableStringBuilder().apply {
append(getString(R.string.warning_replace_file)) append(getString(R.string.warning_replace_file))
append("\n\n") append("\n\n")

View file

@ -31,6 +31,7 @@ import android.view.View
import android.widget.CompoundButton import android.widget.CompoundButton
import android.widget.TextView import android.widget.TextView
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textfield.TextInputLayout import com.google.android.material.textfield.TextInputLayout
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.activities.helpers.ExternalFileHelper import com.kunzisoft.keepass.activities.helpers.ExternalFileHelper
@ -313,7 +314,7 @@ class SetMainCredentialDialogFragment : DatabaseDialogFragment() {
private fun showEmptyPasswordConfirmationDialog() { private fun showEmptyPasswordConfirmationDialog() {
activity?.let { activity?.let {
val builder = AlertDialog.Builder(it) val builder = MaterialAlertDialogBuilder(it)
builder.setMessage(R.string.warning_empty_password) builder.setMessage(R.string.warning_empty_password)
.setPositiveButton(android.R.string.ok) { _, _ -> .setPositiveButton(android.R.string.ok) { _, _ ->
mListener?.onAssignKeyDialogPositiveClick(retrieveMainCredential()) mListener?.onAssignKeyDialogPositiveClick(retrieveMainCredential())
@ -327,7 +328,7 @@ class SetMainCredentialDialogFragment : DatabaseDialogFragment() {
private fun showNoKeyConfirmationDialog() { private fun showNoKeyConfirmationDialog() {
activity?.let { activity?.let {
val builder = AlertDialog.Builder(it) val builder = MaterialAlertDialogBuilder(it)
builder.setMessage(R.string.warning_no_encryption_key) builder.setMessage(R.string.warning_no_encryption_key)
.setPositiveButton(android.R.string.ok) { _, _ -> .setPositiveButton(android.R.string.ok) { _, _ ->
mListener?.onAssignKeyDialogPositiveClick(retrieveMainCredential()) mListener?.onAssignKeyDialogPositiveClick(retrieveMainCredential())
@ -341,7 +342,7 @@ class SetMainCredentialDialogFragment : DatabaseDialogFragment() {
private fun showEmptyKeyFileConfirmationDialog() { private fun showEmptyKeyFileConfirmationDialog() {
activity?.let { activity?.let {
val builder = AlertDialog.Builder(it) val builder = MaterialAlertDialogBuilder(it)
builder.setMessage(SpannableStringBuilder().apply { builder.setMessage(SpannableStringBuilder().apply {
append(getString(R.string.warning_empty_keyfile)) append(getString(R.string.warning_empty_keyfile))
append("\n\n") append("\n\n")

View file

@ -31,6 +31,7 @@ import android.view.ViewGroup
import android.view.inputmethod.EditorInfo import android.view.inputmethod.EditorInfo
import android.widget.* import android.widget.*
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textfield.TextInputLayout import com.google.android.material.textfield.TextInputLayout
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.model.OtpModel import com.kunzisoft.keepass.model.OtpModel
@ -231,7 +232,7 @@ class SetOTPDialogFragment : DatabaseDialogFragment() {
attachListeners() attachListeners()
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
builder.apply { builder.apply {
setView(root) setView(root)
.setPositiveButton(android.R.string.ok) { _, _ -> .setPositiveButton(android.R.string.ok) { _, _ ->

View file

@ -26,7 +26,7 @@ import android.view.View
import android.widget.CompoundButton import android.widget.CompoundButton
import android.widget.RadioGroup import android.widget.RadioGroup
import androidx.annotation.IdRes import androidx.annotation.IdRes
import androidx.appcompat.app.AlertDialog import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.database.element.SortNodeEnum import com.kunzisoft.keepass.database.element.SortNodeEnum
@ -60,7 +60,7 @@ class SortDialogFragment : DatabaseDialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
activity?.let { activity -> activity?.let { activity ->
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
var recycleBinAllowed = false var recycleBinAllowed = false

View file

@ -22,12 +22,12 @@ package com.kunzisoft.keepass.activities.dialogs
import android.app.Dialog import android.app.Dialog
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import androidx.fragment.app.DialogFragment
import androidx.appcompat.app.AlertDialog
import android.text.SpannableStringBuilder import android.text.SpannableStringBuilder
import android.text.method.LinkMovementMethod import android.text.method.LinkMovementMethod
import android.widget.TextView import android.widget.TextView
import androidx.core.text.HtmlCompat import androidx.core.text.HtmlCompat
import androidx.fragment.app.DialogFragment
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
class UnavailableFeatureDialogFragment : DialogFragment() { class UnavailableFeatureDialogFragment : DialogFragment() {
@ -43,7 +43,7 @@ class UnavailableFeatureDialogFragment : DialogFragment() {
val rootView = activity.layoutInflater.inflate(R.layout.fragment_unavailable_feature, null) val rootView = activity.layoutInflater.inflate(R.layout.fragment_unavailable_feature, null)
val messageView = rootView.findViewById<TextView>(R.id.unavailable_feature_message) val messageView = rootView.findViewById<TextView>(R.id.unavailable_feature_message)
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
val message = SpannableStringBuilder() val message = SpannableStringBuilder()
message.append(getString(R.string.unavailable_feature_text)) message.append(getString(R.string.unavailable_feature_text))

View file

@ -25,6 +25,7 @@ import android.text.SpannableStringBuilder
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import androidx.core.text.HtmlCompat import androidx.core.text.HtmlCompat
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.utils.UriUtil.openUrl import com.kunzisoft.keepass.utils.UriUtil.openUrl
@ -36,7 +37,7 @@ class UnderDevelopmentFeatureDialogFragment : DialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
activity?.let { activity -> activity?.let { activity ->
// Use the Builder class for convenient dialog construction // Use the Builder class for convenient dialog construction
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
val stringBuilder = SpannableStringBuilder() val stringBuilder = SpannableStringBuilder()
/* /*

View file

@ -12,6 +12,7 @@ import androidx.fragment.app.activityViewModels
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.SimpleItemAnimator import androidx.recyclerview.widget.SimpleItemAnimator
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.adapters.EntryAttachmentsItemsAdapter import com.kunzisoft.keepass.adapters.EntryAttachmentsItemsAdapter
import com.kunzisoft.keepass.database.ContextualDatabase import com.kunzisoft.keepass.database.ContextualDatabase
@ -190,7 +191,7 @@ class EntryFragment: DatabaseFragment() {
private fun showClipboardDialog() { private fun showClipboardDialog() {
context?.let { context?.let {
AlertDialog.Builder(it) MaterialAlertDialogBuilder(it)
.setMessage( .setMessage(
getString(R.string.allow_copy_password_warning) + getString(R.string.allow_copy_password_warning) +
"\n\n" + "\n\n" +

View file

@ -30,7 +30,7 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.Toast import android.widget.Toast
import androidx.activity.viewModels import androidx.activity.viewModels
import androidx.appcompat.app.AlertDialog import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.activities.dialogs.DeleteNodesDialogFragment import com.kunzisoft.keepass.activities.dialogs.DeleteNodesDialogFragment
import com.kunzisoft.keepass.activities.dialogs.PasswordEncodingDialogFragment import com.kunzisoft.keepass.activities.dialogs.PasswordEncodingDialogFragment
@ -438,7 +438,7 @@ abstract class DatabaseLockActivity : DatabaseModeActivity(),
protected fun lockAndExit() { protected fun lockAndExit() {
// Ask confirmation if modification not saved // Ask confirmation if modification not saved
if (mDatabase?.dataModifiedSinceLastLoading == true) { if (mDatabase?.dataModifiedSinceLastLoading == true) {
AlertDialog.Builder(this) MaterialAlertDialogBuilder(this)
.setMessage(R.string.discard_changes) .setMessage(R.string.discard_changes)
.setNegativeButton(android.R.string.cancel, null) .setNegativeButton(android.R.string.cancel, null)
.setPositiveButton(R.string.lock) { _, _ -> .setPositiveButton(R.string.lock) { _, _ ->

View file

@ -20,7 +20,6 @@
package com.kunzisoft.keepass.database package com.kunzisoft.keepass.database
import android.Manifest import android.Manifest
import android.app.AlertDialog
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.ComponentName import android.content.ComponentName
import android.content.Context import android.content.Context
@ -42,6 +41,7 @@ import androidx.core.app.ActivityCompat.shouldShowRequestPermissionRationale
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.activities.dialogs.DatabaseChangedDialogFragment import com.kunzisoft.keepass.activities.dialogs.DatabaseChangedDialogFragment
import com.kunzisoft.keepass.activities.dialogs.DatabaseChangedDialogFragment.Companion.DATABASE_CHANGED_DIALOG_TAG import com.kunzisoft.keepass.activities.dialogs.DatabaseChangedDialogFragment.Companion.DATABASE_CHANGED_DIALOG_TAG
@ -107,7 +107,7 @@ class DatabaseTaskProvider(
// To show dialog only if context is an activity // To show dialog only if context is an activity
private var activity: FragmentActivity? = try { context as? FragmentActivity? } private var activity: FragmentActivity? = try { context as? FragmentActivity? }
catch (_: Exception) { null } catch (_: Exception) { null }
var onDatabaseRetrieved: ((database: ContextualDatabase?) -> Unit)? = null var onDatabaseRetrieved: ((database: ContextualDatabase?) -> Unit)? = null
@ -321,10 +321,10 @@ class DatabaseTaskProvider(
} }
} }
context.registerReceiver(databaseTaskBroadcastReceiver, context.registerReceiver(databaseTaskBroadcastReceiver,
IntentFilter().apply { IntentFilter().apply {
addAction(DATABASE_START_TASK_ACTION) addAction(DATABASE_START_TASK_ACTION)
addAction(DATABASE_STOP_TASK_ACTION) addAction(DATABASE_STOP_TASK_ACTION)
} }
) )
// Check if a service is currently running else do nothing // Check if a service is currently running else do nothing
@ -348,12 +348,12 @@ class DatabaseTaskProvider(
private val requestPermissionLauncher = activity?.registerForActivityResult( private val requestPermissionLauncher = activity?.registerForActivityResult(
ActivityResultContracts.RequestPermission() ActivityResultContracts.RequestPermission()
) { _ -> ) { _ ->
// Whether or not the user has accepted, the service can be started, // Whether or not the user has accepted, the service can be started,
// There just won't be any notification if it's not allowed. // There just won't be any notification if it's not allowed.
tempServiceParameters.removeFirstOrNull()?.let { tempServiceParameters.removeFirstOrNull()?.let {
startService(it.first, it.second) startService(it.first, it.second)
}
} }
}
private fun start(bundle: Bundle? = null, actionTask: String) { private fun start(bundle: Bundle? = null, actionTask: String) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
@ -370,7 +370,7 @@ class DatabaseTaskProvider(
// it's not the first time, so the user deliberately chooses not to display the notification // it's not the first time, so the user deliberately chooses not to display the notification
startService(bundle, actionTask) startService(bundle, actionTask)
} else { } else {
AlertDialog.Builder(activity) MaterialAlertDialogBuilder(context)
.setMessage(R.string.warning_database_notification_permission) .setMessage(R.string.warning_database_notification_permission)
.setNegativeButton(R.string.later) { _, _ -> .setNegativeButton(R.string.later) { _, _ ->
// Refuses the notification, so start the service // Refuses the notification, so start the service
@ -412,7 +412,7 @@ class DatabaseTaskProvider(
putParcelable(DatabaseTaskNotificationService.DATABASE_URI_KEY, databaseUri) putParcelable(DatabaseTaskNotificationService.DATABASE_URI_KEY, databaseUri)
putParcelable(DatabaseTaskNotificationService.MAIN_CREDENTIAL_KEY, mainCredential) putParcelable(DatabaseTaskNotificationService.MAIN_CREDENTIAL_KEY, mainCredential)
} }
, ACTION_DATABASE_CREATE_TASK) , ACTION_DATABASE_CREATE_TASK)
} }
fun startDatabaseLoad(databaseUri: Uri, fun startDatabaseLoad(databaseUri: Uri,
@ -427,7 +427,7 @@ class DatabaseTaskProvider(
putParcelable(DatabaseTaskNotificationService.CIPHER_DATABASE_KEY, cipherEncryptDatabase) putParcelable(DatabaseTaskNotificationService.CIPHER_DATABASE_KEY, cipherEncryptDatabase)
putBoolean(DatabaseTaskNotificationService.FIX_DUPLICATE_UUID_KEY, fixDuplicateUuid) putBoolean(DatabaseTaskNotificationService.FIX_DUPLICATE_UUID_KEY, fixDuplicateUuid)
} }
, ACTION_DATABASE_LOAD_TASK) , ACTION_DATABASE_LOAD_TASK)
} }
fun startDatabaseMerge(save: Boolean, fun startDatabaseMerge(save: Boolean,
@ -445,12 +445,12 @@ class DatabaseTaskProvider(
start(Bundle().apply { start(Bundle().apply {
putBoolean(DatabaseTaskNotificationService.FIX_DUPLICATE_UUID_KEY, fixDuplicateUuid) putBoolean(DatabaseTaskNotificationService.FIX_DUPLICATE_UUID_KEY, fixDuplicateUuid)
} }
, ACTION_DATABASE_RELOAD_TASK) , ACTION_DATABASE_RELOAD_TASK)
} }
fun askToStartDatabaseReload(conditionToAsk: Boolean, approved: () -> Unit) { fun askToStartDatabaseReload(conditionToAsk: Boolean, approved: () -> Unit) {
if (conditionToAsk) { if (conditionToAsk) {
AlertDialog.Builder(context) MaterialAlertDialogBuilder(context)
.setMessage(R.string.warning_database_info_reloaded) .setMessage(R.string.warning_database_info_reloaded)
.setNegativeButton(android.R.string.cancel, null) .setNegativeButton(android.R.string.cancel, null)
.setPositiveButton(android.R.string.ok) { _, _ -> .setPositiveButton(android.R.string.ok) { _, _ ->
@ -469,7 +469,7 @@ class DatabaseTaskProvider(
putParcelable(DatabaseTaskNotificationService.DATABASE_URI_KEY, databaseUri) putParcelable(DatabaseTaskNotificationService.DATABASE_URI_KEY, databaseUri)
putParcelable(DatabaseTaskNotificationService.MAIN_CREDENTIAL_KEY, mainCredential) putParcelable(DatabaseTaskNotificationService.MAIN_CREDENTIAL_KEY, mainCredential)
} }
, ACTION_DATABASE_ASSIGN_CREDENTIAL_TASK) , ACTION_DATABASE_ASSIGN_CREDENTIAL_TASK)
} }
/* /*
@ -486,7 +486,7 @@ class DatabaseTaskProvider(
putParcelable(DatabaseTaskNotificationService.PARENT_ID_KEY, parent.nodeId) putParcelable(DatabaseTaskNotificationService.PARENT_ID_KEY, parent.nodeId)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_CREATE_GROUP_TASK) , ACTION_DATABASE_CREATE_GROUP_TASK)
} }
fun startDatabaseUpdateGroup(oldGroup: Group, fun startDatabaseUpdateGroup(oldGroup: Group,
@ -497,7 +497,7 @@ class DatabaseTaskProvider(
putParcelable(DatabaseTaskNotificationService.GROUP_KEY, groupToUpdate) putParcelable(DatabaseTaskNotificationService.GROUP_KEY, groupToUpdate)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_UPDATE_GROUP_TASK) , ACTION_DATABASE_UPDATE_GROUP_TASK)
} }
fun startDatabaseCreateEntry(newEntry: Entry, fun startDatabaseCreateEntry(newEntry: Entry,
@ -508,7 +508,7 @@ class DatabaseTaskProvider(
putParcelable(DatabaseTaskNotificationService.PARENT_ID_KEY, parent.nodeId) putParcelable(DatabaseTaskNotificationService.PARENT_ID_KEY, parent.nodeId)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_CREATE_ENTRY_TASK) , ACTION_DATABASE_CREATE_ENTRY_TASK)
} }
fun startDatabaseUpdateEntry(oldEntry: Entry, fun startDatabaseUpdateEntry(oldEntry: Entry,
@ -519,7 +519,7 @@ class DatabaseTaskProvider(
putParcelable(DatabaseTaskNotificationService.ENTRY_KEY, entryToUpdate) putParcelable(DatabaseTaskNotificationService.ENTRY_KEY, entryToUpdate)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_UPDATE_ENTRY_TASK) , ACTION_DATABASE_UPDATE_ENTRY_TASK)
} }
private fun startDatabaseActionListNodes(actionTask: String, private fun startDatabaseActionListNodes(actionTask: String,
@ -548,7 +548,7 @@ class DatabaseTaskProvider(
putParcelable(DatabaseTaskNotificationService.PARENT_ID_KEY, newParentId) putParcelable(DatabaseTaskNotificationService.PARENT_ID_KEY, newParentId)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, actionTask) , actionTask)
} }
fun startDatabaseCopyNodes(nodesToCopy: List<Node>, fun startDatabaseCopyNodes(nodesToCopy: List<Node>,
@ -582,7 +582,7 @@ class DatabaseTaskProvider(
putInt(DatabaseTaskNotificationService.ENTRY_HISTORY_POSITION_KEY, entryHistoryPosition) putInt(DatabaseTaskNotificationService.ENTRY_HISTORY_POSITION_KEY, entryHistoryPosition)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_RESTORE_ENTRY_HISTORY) , ACTION_DATABASE_RESTORE_ENTRY_HISTORY)
} }
fun startDatabaseDeleteEntryHistory(mainEntryId: NodeId<UUID>, fun startDatabaseDeleteEntryHistory(mainEntryId: NodeId<UUID>,
@ -593,7 +593,7 @@ class DatabaseTaskProvider(
putInt(DatabaseTaskNotificationService.ENTRY_HISTORY_POSITION_KEY, entryHistoryPosition) putInt(DatabaseTaskNotificationService.ENTRY_HISTORY_POSITION_KEY, entryHistoryPosition)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_DELETE_ENTRY_HISTORY) , ACTION_DATABASE_DELETE_ENTRY_HISTORY)
} }
/* /*
@ -610,7 +610,7 @@ class DatabaseTaskProvider(
putString(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newName) putString(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newName)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_UPDATE_NAME_TASK) , ACTION_DATABASE_UPDATE_NAME_TASK)
} }
fun startDatabaseSaveDescription(oldDescription: String, fun startDatabaseSaveDescription(oldDescription: String,
@ -621,7 +621,7 @@ class DatabaseTaskProvider(
putString(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newDescription) putString(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newDescription)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_UPDATE_DESCRIPTION_TASK) , ACTION_DATABASE_UPDATE_DESCRIPTION_TASK)
} }
fun startDatabaseSaveDefaultUsername(oldDefaultUsername: String, fun startDatabaseSaveDefaultUsername(oldDefaultUsername: String,
@ -632,7 +632,7 @@ class DatabaseTaskProvider(
putString(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newDefaultUsername) putString(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newDefaultUsername)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_UPDATE_DEFAULT_USERNAME_TASK) , ACTION_DATABASE_UPDATE_DEFAULT_USERNAME_TASK)
} }
fun startDatabaseSaveColor(oldColor: String, fun startDatabaseSaveColor(oldColor: String,
@ -643,7 +643,7 @@ class DatabaseTaskProvider(
putString(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newColor) putString(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newColor)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_UPDATE_COLOR_TASK) , ACTION_DATABASE_UPDATE_COLOR_TASK)
} }
fun startDatabaseSaveCompression(oldCompression: CompressionAlgorithm, fun startDatabaseSaveCompression(oldCompression: CompressionAlgorithm,
@ -654,14 +654,14 @@ class DatabaseTaskProvider(
putSerializable(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newCompression) putSerializable(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newCompression)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_UPDATE_COMPRESSION_TASK) , ACTION_DATABASE_UPDATE_COMPRESSION_TASK)
} }
fun startDatabaseRemoveUnlinkedData(save: Boolean) { fun startDatabaseRemoveUnlinkedData(save: Boolean) {
start(Bundle().apply { start(Bundle().apply {
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_REMOVE_UNLINKED_DATA_TASK) , ACTION_DATABASE_REMOVE_UNLINKED_DATA_TASK)
} }
fun startDatabaseSaveRecycleBin(oldRecycleBin: Group?, fun startDatabaseSaveRecycleBin(oldRecycleBin: Group?,
@ -694,7 +694,7 @@ class DatabaseTaskProvider(
putInt(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newMaxHistoryItems) putInt(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newMaxHistoryItems)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_UPDATE_MAX_HISTORY_ITEMS_TASK) , ACTION_DATABASE_UPDATE_MAX_HISTORY_ITEMS_TASK)
} }
fun startDatabaseSaveMaxHistorySize(oldMaxHistorySize: Long, fun startDatabaseSaveMaxHistorySize(oldMaxHistorySize: Long,
@ -705,7 +705,7 @@ class DatabaseTaskProvider(
putLong(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newMaxHistorySize) putLong(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newMaxHistorySize)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_UPDATE_MAX_HISTORY_SIZE_TASK) , ACTION_DATABASE_UPDATE_MAX_HISTORY_SIZE_TASK)
} }
/* /*
@ -722,7 +722,7 @@ class DatabaseTaskProvider(
putSerializable(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newEncryption) putSerializable(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newEncryption)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_UPDATE_ENCRYPTION_TASK) , ACTION_DATABASE_UPDATE_ENCRYPTION_TASK)
} }
fun startDatabaseSaveKeyDerivation(oldKeyDerivation: KdfEngine, fun startDatabaseSaveKeyDerivation(oldKeyDerivation: KdfEngine,
@ -733,7 +733,7 @@ class DatabaseTaskProvider(
putSerializable(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newKeyDerivation) putSerializable(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newKeyDerivation)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_UPDATE_KEY_DERIVATION_TASK) , ACTION_DATABASE_UPDATE_KEY_DERIVATION_TASK)
} }
fun startDatabaseSaveIterations(oldIterations: Long, fun startDatabaseSaveIterations(oldIterations: Long,
@ -744,7 +744,7 @@ class DatabaseTaskProvider(
putLong(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newIterations) putLong(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newIterations)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_UPDATE_ITERATIONS_TASK) , ACTION_DATABASE_UPDATE_ITERATIONS_TASK)
} }
fun startDatabaseSaveMemoryUsage(oldMemoryUsage: Long, fun startDatabaseSaveMemoryUsage(oldMemoryUsage: Long,
@ -755,7 +755,7 @@ class DatabaseTaskProvider(
putLong(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newMemoryUsage) putLong(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newMemoryUsage)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_UPDATE_MEMORY_USAGE_TASK) , ACTION_DATABASE_UPDATE_MEMORY_USAGE_TASK)
} }
fun startDatabaseSaveParallelism(oldParallelism: Long, fun startDatabaseSaveParallelism(oldParallelism: Long,
@ -766,7 +766,7 @@ class DatabaseTaskProvider(
putLong(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newParallelism) putLong(DatabaseTaskNotificationService.NEW_ELEMENT_KEY, newParallelism)
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
} }
, ACTION_DATABASE_UPDATE_PARALLELISM_TASK) , ACTION_DATABASE_UPDATE_PARALLELISM_TASK)
} }
/** /**
@ -777,14 +777,14 @@ class DatabaseTaskProvider(
putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save) putBoolean(DatabaseTaskNotificationService.SAVE_DATABASE_KEY, save)
putParcelable(DatabaseTaskNotificationService.DATABASE_URI_KEY, saveToUri) putParcelable(DatabaseTaskNotificationService.DATABASE_URI_KEY, saveToUri)
} }
, ACTION_DATABASE_SAVE) , ACTION_DATABASE_SAVE)
} }
fun startChallengeResponded(response: ByteArray?) { fun startChallengeResponded(response: ByteArray?) {
start(Bundle().apply { start(Bundle().apply {
putByteArray(DatabaseTaskNotificationService.DATA_BYTES, response) putByteArray(DatabaseTaskNotificationService.DATA_BYTES, response)
} }
, ACTION_CHALLENGE_RESPONDED) , ACTION_CHALLENGE_RESPONDED)
} }
companion object { companion object {

View file

@ -10,7 +10,7 @@ import androidx.activity.result.ActivityResult
import androidx.activity.result.ActivityResultCallback import androidx.activity.result.ActivityResultCallback
import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AlertDialog import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.activities.legacy.DatabaseModeActivity import com.kunzisoft.keepass.activities.legacy.DatabaseModeActivity
import com.kunzisoft.keepass.database.ContextualDatabase import com.kunzisoft.keepass.database.ContextualDatabase
@ -151,7 +151,7 @@ class HardwareKeyActivity: DatabaseModeActivity(){
hardwareKey: HardwareKey, hardwareKey: HardwareKey,
onDialogDismissed: DialogInterface.OnDismissListener onDialogDismissed: DialogInterface.OnDismissListener
) { ) {
val builder = AlertDialog.Builder(context) val builder = MaterialAlertDialogBuilder(context)
builder builder
.setMessage( .setMessage(
context.getString(R.string.error_driver_required, hardwareKey.toString()) context.getString(R.string.error_driver_required, hardwareKey.toString())

View file

@ -8,10 +8,10 @@ import androidx.activity.result.ActivityResult
import androidx.activity.result.ActivityResultCallback import androidx.activity.result.ActivityResultCallback
import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.utils.UriUtil.openExternalApp import com.kunzisoft.keepass.utils.UriUtil.openExternalApp
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
@ -128,7 +128,7 @@ class HardwareKeyResponseHelper {
hardwareKey: HardwareKey hardwareKey: HardwareKey
) { ) {
activity.lifecycleScope.launch { activity.lifecycleScope.launch {
val builder = AlertDialog.Builder(activity) val builder = MaterialAlertDialogBuilder(activity)
builder builder
.setMessage( .setMessage(
activity.getString(R.string.error_driver_required, hardwareKey.toString()) activity.getString(R.string.error_driver_required, hardwareKey.toString())

View file

@ -24,7 +24,7 @@ import android.os.Bundle
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import androidx.preference.Preference import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreference import androidx.preference.TwoStatePreference
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.settings.preferencedialogfragment.AutofillBlocklistAppIdPreferenceDialogFragmentCompat import com.kunzisoft.keepass.settings.preferencedialogfragment.AutofillBlocklistAppIdPreferenceDialogFragmentCompat
import com.kunzisoft.keepass.settings.preferencedialogfragment.AutofillBlocklistWebDomainPreferenceDialogFragmentCompat import com.kunzisoft.keepass.settings.preferencedialogfragment.AutofillBlocklistWebDomainPreferenceDialogFragmentCompat
@ -35,7 +35,7 @@ class AutofillSettingsFragment : PreferenceFragmentCompat() {
// Load the preferences from an XML resource // Load the preferences from an XML resource
setPreferencesFromResource(R.xml.preferences_autofill, rootKey) setPreferencesFromResource(R.xml.preferences_autofill, rootKey)
val autofillInlineSuggestionsPreference: SwitchPreference? = findPreference(getString(R.string.autofill_inline_suggestions_key)) val autofillInlineSuggestionsPreference: TwoStatePreference? = findPreference(getString(R.string.autofill_inline_suggestions_key))
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
autofillInlineSuggestionsPreference?.isVisible = false autofillInlineSuggestionsPreference?.isVisible = false
} }

View file

@ -34,7 +34,8 @@ import androidx.fragment.app.DialogFragment
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import androidx.preference.ListPreference import androidx.preference.ListPreference
import androidx.preference.Preference import androidx.preference.Preference
import androidx.preference.SwitchPreference import androidx.preference.TwoStatePreference
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.BuildConfig import com.kunzisoft.keepass.BuildConfig
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.activities.dialogs.ProFeatureDialogFragment import com.kunzisoft.keepass.activities.dialogs.ProFeatureDialogFragment
@ -119,14 +120,14 @@ class NestedAppSettingsFragment : NestedSettingsFragment() {
activity?.let { activity -> activity?.let { activity ->
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val autoFillEnablePreference: SwitchPreference? = findPreference(getString(R.string.settings_autofill_enable_key)) val autoFillEnablePreference: TwoStatePreference? = findPreference(getString(R.string.settings_autofill_enable_key))
val autofillManager = activity.getSystemService(AutofillManager::class.java) val autofillManager = activity.getSystemService(AutofillManager::class.java)
if (autofillManager != null && autofillManager.hasEnabledAutofillServices()) if (autofillManager != null && autofillManager.hasEnabledAutofillServices())
autoFillEnablePreference?.isChecked = autofillManager.hasEnabledAutofillServices() autoFillEnablePreference?.isChecked = autofillManager.hasEnabledAutofillServices()
autoFillEnablePreference?.onPreferenceClickListener = object : Preference.OnPreferenceClickListener { autoFillEnablePreference?.onPreferenceClickListener = object : Preference.OnPreferenceClickListener {
@RequiresApi(api = Build.VERSION_CODES.O) @RequiresApi(api = Build.VERSION_CODES.O)
override fun onPreferenceClick(preference: Preference): Boolean { override fun onPreferenceClick(preference: Preference): Boolean {
if ((preference as SwitchPreference).isChecked) { if ((preference as TwoStatePreference).isChecked) {
try { try {
enableService() enableService()
} catch (e: ActivityNotFoundException) { } catch (e: ActivityNotFoundException) {
@ -208,14 +209,13 @@ class NestedAppSettingsFragment : NestedSettingsFragment() {
false false
} }
val copyPasswordPreference: SwitchPreference? = findPreference(getString(R.string.allow_copy_password_key)) val copyPasswordPreference: TwoStatePreference? = findPreference(getString(R.string.allow_copy_password_key))
copyPasswordPreference?.setOnPreferenceChangeListener { _, newValue -> copyPasswordPreference?.setOnPreferenceChangeListener { _, newValue ->
if (newValue as Boolean && context != null) { if (newValue as Boolean && context != null) {
val message = getString(R.string.allow_copy_password_warning) + val message = getString(R.string.allow_copy_password_warning) +
"\n\n" + "\n\n" +
getString(R.string.clipboard_warning) getString(R.string.clipboard_warning)
AlertDialog MaterialAlertDialogBuilder(requireContext())
.Builder(requireContext())
.setMessage(message) .setMessage(message)
.create() .create()
.apply { .apply {
@ -240,10 +240,10 @@ class NestedAppSettingsFragment : NestedSettingsFragment() {
activity?.let { activity -> activity?.let { activity ->
val biometricUnlockEnablePreference: SwitchPreference? = findPreference(getString(R.string.biometric_unlock_enable_key)) val biometricUnlockEnablePreference: TwoStatePreference? = findPreference(getString(R.string.biometric_unlock_enable_key))
val deviceCredentialUnlockEnablePreference: SwitchPreference? = findPreference(getString(R.string.device_credential_unlock_enable_key)) val deviceCredentialUnlockEnablePreference: TwoStatePreference? = findPreference(getString(R.string.device_credential_unlock_enable_key))
val autoOpenPromptPreference: SwitchPreference? = findPreference(getString(R.string.biometric_auto_open_prompt_key)) val autoOpenPromptPreference: TwoStatePreference? = findPreference(getString(R.string.biometric_auto_open_prompt_key))
val tempAdvancedUnlockPreference: SwitchPreference? = findPreference(getString(R.string.temp_advanced_unlock_enable_key)) val tempAdvancedUnlockPreference: TwoStatePreference? = findPreference(getString(R.string.temp_advanced_unlock_enable_key))
val biometricUnlockSupported = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { val biometricUnlockSupported = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
AdvancedUnlockManager.biometricUnlockSupported(activity) AdvancedUnlockManager.biometricUnlockSupported(activity)
@ -253,7 +253,7 @@ class NestedAppSettingsFragment : NestedSettingsFragment() {
if (!biometricUnlockSupported) { if (!biometricUnlockSupported) {
isChecked = false isChecked = false
setOnPreferenceClickListener { preference -> setOnPreferenceClickListener { preference ->
(preference as SwitchPreference).isChecked = false (preference as TwoStatePreference).isChecked = false
UnavailableFeatureDialogFragment.getInstance(Build.VERSION_CODES.M) UnavailableFeatureDialogFragment.getInstance(Build.VERSION_CODES.M)
.show(parentFragmentManager, "unavailableFeatureDialog") .show(parentFragmentManager, "unavailableFeatureDialog")
false false
@ -300,7 +300,7 @@ class NestedAppSettingsFragment : NestedSettingsFragment() {
if (!deviceCredentialUnlockSupported) { if (!deviceCredentialUnlockSupported) {
isChecked = false isChecked = false
setOnPreferenceClickListener { preference -> setOnPreferenceClickListener { preference ->
(preference as SwitchPreference).isChecked = false (preference as TwoStatePreference).isChecked = false
UnavailableFeatureDialogFragment.getInstance(Build.VERSION_CODES.M) UnavailableFeatureDialogFragment.getInstance(Build.VERSION_CODES.M)
.show(parentFragmentManager, "unavailableFeatureDialog") .show(parentFragmentManager, "unavailableFeatureDialog")
false false
@ -382,7 +382,7 @@ class NestedAppSettingsFragment : NestedSettingsFragment() {
if (deleteKeys) { if (deleteKeys) {
message += resources.getString(R.string.advanced_unlock_delete_all_key_warning) message += resources.getString(R.string.advanced_unlock_delete_all_key_warning)
} }
warningAlertDialog = AlertDialog.Builder(activity) warningAlertDialog = MaterialAlertDialogBuilder(activity)
.setMessage(message) .setMessage(message)
.setIcon(android.R.drawable.ic_dialog_alert) .setIcon(android.R.drawable.ic_dialog_alert)
.setPositiveButton(resources.getString(android.R.string.ok) .setPositiveButton(resources.getString(android.R.string.ok)
@ -523,7 +523,7 @@ class NestedAppSettingsFragment : NestedSettingsFragment() {
super.onResume() super.onResume()
activity?.let { activity -> activity?.let { activity ->
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
findPreference<SwitchPreference?>(getString(R.string.settings_autofill_enable_key))?.let { autoFillEnablePreference -> findPreference<TwoStatePreference?>(getString(R.string.settings_autofill_enable_key))?.let { autoFillEnablePreference ->
val autofillManager = activity.getSystemService(AutofillManager::class.java) val autofillManager = activity.getSystemService(AutofillManager::class.java)
autoFillEnablePreference.isChecked = autofillManager != null autoFillEnablePreference.isChecked = autofillManager != null
&& autofillManager.hasEnabledAutofillServices() && autofillManager.hasEnabledAutofillServices()

View file

@ -28,7 +28,7 @@ import androidx.fragment.app.DialogFragment
import androidx.fragment.app.activityViewModels import androidx.fragment.app.activityViewModels
import androidx.preference.Preference import androidx.preference.Preference
import androidx.preference.PreferenceCategory import androidx.preference.PreferenceCategory
import androidx.preference.SwitchPreference import androidx.preference.TwoStatePreference
import com.kunzisoft.androidclearchroma.ChromaUtil import com.kunzisoft.androidclearchroma.ChromaUtil
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.activities.dialogs.SetMainCredentialDialogFragment import com.kunzisoft.keepass.activities.dialogs.SetMainCredentialDialogFragment
@ -253,7 +253,7 @@ class NestedDatabaseSettingsFragment : NestedSettingsFragment(), DatabaseRetriev
// Recycle bin // Recycle bin
if (database.allowConfigurableRecycleBin) { if (database.allowConfigurableRecycleBin) {
val recycleBinEnablePref: SwitchPreference? = findPreference(getString(R.string.recycle_bin_enable_key)) val recycleBinEnablePref: TwoStatePreference? = findPreference(getString(R.string.recycle_bin_enable_key))
recycleBinEnablePref?.apply { recycleBinEnablePref?.apply {
isChecked = database.isRecycleBinEnabled isChecked = database.isRecycleBinEnabled
isEnabled = if (!mDatabaseReadOnly) { isEnabled = if (!mDatabaseReadOnly) {
@ -286,7 +286,7 @@ class NestedDatabaseSettingsFragment : NestedSettingsFragment(), DatabaseRetriev
val templatesGroupPrefCategory: PreferenceCategory? = findPreference(getString(R.string.database_category_templates_key)) val templatesGroupPrefCategory: PreferenceCategory? = findPreference(getString(R.string.database_category_templates_key))
templatesGroupPref = findPreference(getString(R.string.templates_group_uuid_key)) templatesGroupPref = findPreference(getString(R.string.templates_group_uuid_key))
if (database.allowTemplatesGroup) { if (database.allowTemplatesGroup) {
val templatesEnablePref: SwitchPreference? = findPreference(getString(R.string.templates_group_enable_key)) val templatesEnablePref: TwoStatePreference? = findPreference(getString(R.string.templates_group_enable_key))
templatesEnablePref?.apply { templatesEnablePref?.apply {
isChecked = database.isTemplatesEnabled isChecked = database.isTemplatesEnabled
isEnabled = if (!mDatabaseReadOnly) { isEnabled = if (!mDatabaseReadOnly) {

View file

@ -23,7 +23,7 @@ import android.content.res.Resources
import android.os.Bundle import android.os.Bundle
import androidx.preference.Preference import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreference import androidx.preference.TwoStatePreference
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.activities.dialogs.UnderDevelopmentFeatureDialogFragment import com.kunzisoft.keepass.activities.dialogs.UnderDevelopmentFeatureDialogFragment
@ -49,7 +49,7 @@ abstract class NestedSettingsFragment : PreferenceFragmentCompat() {
protected fun preferenceInDevelopment(preferenceInDev: Preference) { protected fun preferenceInDevelopment(preferenceInDev: Preference) {
preferenceInDev.setOnPreferenceClickListener { preference -> preferenceInDev.setOnPreferenceClickListener { preference ->
try { // don't check if we can try { // don't check if we can
(preference as SwitchPreference).isChecked = false (preference as TwoStatePreference).isChecked = false
} catch (ignored: Exception) { } catch (ignored: Exception) {
} }
UnderDevelopmentFeatureDialogFragment().show(parentFragmentManager, "underDevFeatureDialog") UnderDevelopmentFeatureDialogFragment().show(parentFragmentManager, "underDevFeatureDialog")

View file

@ -28,7 +28,7 @@ import android.view.ViewGroup
import android.view.Window import android.view.Window
import android.widget.CompoundButton import android.widget.CompoundButton
import androidx.annotation.ColorInt import androidx.annotation.ColorInt
import androidx.appcompat.app.AlertDialog import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.androidclearchroma.view.ChromaColorView import com.kunzisoft.androidclearchroma.view.ChromaColorView
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.database.ContextualDatabase import com.kunzisoft.keepass.database.ContextualDatabase
@ -45,7 +45,7 @@ class DatabaseColorPreferenceDialogFragmentCompat : DatabaseSavePreferenceDialog
private var mActivated = false private var mActivated = false
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val alertDialogBuilder = AlertDialog.Builder(requireActivity()) val alertDialogBuilder = MaterialAlertDialogBuilder(requireActivity())
rootView = requireActivity().layoutInflater.inflate(R.layout.fragment_color_picker, null) rootView = requireActivity().layoutInflater.inflate(R.layout.fragment_color_picker, null)
enableSwitchView = rootView.findViewById(R.id.switch_element) enableSwitchView = rootView.findViewById(R.id.switch_element)

View file

@ -28,10 +28,10 @@ import android.widget.Button
import android.widget.ProgressBar import android.widget.ProgressBar
import android.widget.TextView import android.widget.TextView
import androidx.annotation.StringRes import androidx.annotation.StringRes
import androidx.appcompat.app.AlertDialog
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
@ -55,7 +55,7 @@ open class ProgressTaskDialogFragment : DialogFragment() {
try { try {
activity?.let { activity?.let {
val builder = AlertDialog.Builder(it) val builder = MaterialAlertDialogBuilder(it)
// Get the layout inflater // Get the layout inflater
val inflater = it.layoutInflater val inflater = it.layoutInflater

View file

@ -31,10 +31,11 @@ import android.text.util.Linkify
import android.util.Log import android.util.Log
import android.widget.TextView import android.widget.TextView
import android.widget.Toast import android.widget.Toast
import androidx.appcompat.app.AlertDialog import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.kunzisoft.keepass.R import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.settings.PreferencesUtil import com.kunzisoft.keepass.settings.PreferencesUtil
import java.util.* import java.util.Timer
import java.util.TimerTask
class ClipboardHelper(context: Context) { class ClipboardHelper(context: Context) {
@ -127,7 +128,7 @@ class ClipboardHelper(context: Context) {
} }
Linkify.addLinks(spannableString, Linkify.WEB_URLS) Linkify.addLinks(spannableString, Linkify.WEB_URLS)
AlertDialog.Builder(mAppContext) MaterialAlertDialogBuilder(mAppContext)
.setTitle(R.string.clipboard_error_title) .setTitle(R.string.clipboard_error_title)
.setView(textView) .setView(textView)
.setPositiveButton(android.R.string.ok) { dialog, _ -> dialog.dismiss() } .setPositiveButton(android.R.string.ok) { dialog, _ -> dialog.dismiss() }

View file

@ -52,7 +52,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/validate" android:contentDescription="@string/validate"
android:src="@drawable/ic_file_upload_white_24dp" android:src="@drawable/ic_file_upload_white_24dp"
app:tint="?attr/colorOnAccentColor"
app:fabSize="mini" app:fabSize="mini"
app:fabCustomSize="@dimen/button_small_size"
app:layout_constraintBottom_toTopOf="@+id/screenshot_mode_banner" app:layout_constraintBottom_toTopOf="@+id/screenshot_mode_banner"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

View file

@ -27,11 +27,11 @@
android:id="@+id/progress_dialog_title" android:id="@+id/progress_dialog_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:layout_marginTop="18dp"
android:layout_marginLeft="20dp" android:layout_marginLeft="32dp"
android:layout_marginRight="20dp" android:layout_marginRight="32dp"
android:layout_marginStart="20dp" android:layout_marginStart="32dp"
android:layout_marginEnd="20dp" android:layout_marginEnd="32dp"
style="@style/KeepassDXStyle.TextAppearance.Title" style="@style/KeepassDXStyle.TextAppearance.Title"
android:textStyle="bold" android:textStyle="bold"
android:textColor="?android:attr/textColor"/> android:textColor="?android:attr/textColor"/>
@ -40,22 +40,22 @@
android:id="@+id/progress_dialog_message" android:id="@+id/progress_dialog_message"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:layout_marginTop="18dp"
android:layout_marginLeft="20dp" android:layout_marginLeft="32dp"
android:layout_marginRight="20dp" android:layout_marginRight="32dp"
android:layout_marginStart="20dp" android:layout_marginStart="32dp"
android:layout_marginEnd="20dp" android:layout_marginEnd="32dp"
style="@style/KeepassDXStyle.TextAppearance.SmallTitle"/> style="@style/KeepassDXStyle.TextAppearance.SmallTitle"/>
<TextView <TextView
android:id="@+id/progress_dialog_warning" android:id="@+id/progress_dialog_warning"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:layout_marginTop="18dp"
android:layout_marginLeft="20dp" android:layout_marginLeft="32dp"
android:layout_marginRight="20dp" android:layout_marginRight="32dp"
android:layout_marginStart="20dp" android:layout_marginStart="32dp"
android:layout_marginEnd="20dp" android:layout_marginEnd="32dp"
style="@style/KeepassDXStyle.TextAppearance.Warning"/> style="@style/KeepassDXStyle.TextAppearance.Warning"/>
<Button <Button
@ -63,9 +63,9 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="end" android:layout_gravity="end"
android:layout_marginTop="20dp" android:layout_marginTop="18dp"
android:layout_marginRight="20dp" android:layout_marginRight="32dp"
android:layout_marginEnd="20dp" android:layout_marginEnd="32dp"
android:text="@string/entry_cancel" /> android:text="@string/entry_cancel" />
<com.google.android.material.progressindicator.LinearProgressIndicator <com.google.android.material.progressindicator.LinearProgressIndicator
@ -73,7 +73,7 @@
app:indicatorColor="?attr/colorAccent" app:indicatorColor="?attr/colorAccent"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:layout_marginTop="18dp"
android:indeterminate="true" android:indeterminate="true"
android:max="100"/> android:max="100"/>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Derived from https://github.com/androidx/androidx/blob/8cb282cc/preference/preference/res/layout/preference_widget_switch_compat.xml -->
<com.google.android.material.materialswitch.MaterialSwitch xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/switchWidget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:theme="?attr/switchAppearance"
android:focusable="false"
android:clickable="false"
android:background="@null" />

View file

@ -5,16 +5,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:filterTouchesWhenObscured="true"> android:filterTouchesWhenObscured="true">
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/lock_button" android:id="@+id/lock_button"
style="@style/KeepassDXStyle.Fab.Special" style="@style/KeepassDXStyle.Fab.Special"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:fabSize="mini" app:fabSize="mini"
app:fabCustomSize="@dimen/button_small_size" app:fabCustomSize="@dimen/button_small_size"
android:layout_gravity="center" app:useCompatPadding="false"
android:layout_margin="8dp" android:layout_margin="8dp"
android:contentDescription="@string/lock" android:contentDescription="@string/lock"
android:visibility="visible" android:visibility="visible"
android:src="@drawable/ic_lock_white_padding_24dp" android:src="@drawable/ic_lock_white_padding_24dp" />
xmlns:app="http://schemas.android.com/apk/res-auto" />
</FrameLayout> </FrameLayout>

View file

@ -13,6 +13,8 @@
android:hint="@string/entry_expires" android:hint="@string/entry_expires"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
app:layout_constraintEnd_toStartOf="@+id/expiration_checkbox"> app:layout_constraintEnd_toStartOf="@+id/expiration_checkbox">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/expiration_text" android:id="@+id/expiration_text"
@ -28,11 +30,12 @@
style="@style/KeepassDXStyle.TextAppearance.TextNode" style="@style/KeepassDXStyle.TextAppearance.TextNode"
tools:text="2020-03-04 05:00" /> tools:text="2020-03-04 05:00" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<androidx.appcompat.widget.SwitchCompat <com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/expiration_checkbox" android:id="@+id/expiration_checkbox"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@+id/expiration_label" app:layout_constraintTop_toTopOf="@+id/expiration_label"
app:layout_constraintBottom_toBottomOf="@+id/expiration_label" app:layout_constraintBottom_toBottomOf="@+id/expiration_label"
android:theme="?attr/switchAppearance"
app:layout_constraintEnd_toEndOf="parent"/> app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -21,15 +21,17 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<androidx.appcompat.widget.SwitchCompat <com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/password_checkbox" android:id="@+id/password_checkbox"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/password_input_layout" android:layout_alignTop="@+id/password_input_layout"
android:layout_alignBottom="@+id/password_input_layout" android:layout_alignBottom="@+id/password_input_layout"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:contentDescription="@string/content_description_password_checkbox" android:contentDescription="@string/content_description_password_checkbox"
android:theme="@style/KeepassDXStyle.Switch" android:theme="?attr/switchAppearance"
android:focusable="false" android:focusable="false"
android:gravity="center_vertical" /> android:gravity="center_vertical" />
@ -64,15 +66,17 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<androidx.appcompat.widget.SwitchCompat <com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/keyfile_checkbox" android:id="@+id/keyfile_checkbox"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/keyfile_selection" android:layout_alignTop="@+id/keyfile_selection"
android:layout_alignBottom="@+id/keyfile_selection" android:layout_alignBottom="@+id/keyfile_selection"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:contentDescription="@string/content_description_keyfile_checkbox" android:contentDescription="@string/content_description_keyfile_checkbox"
android:theme="@style/KeepassDXStyle.Switch" android:theme="?attr/switchAppearance"
android:focusable="false" android:focusable="false"
android:gravity="center_vertical" /> android:gravity="center_vertical" />
@ -93,15 +97,17 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<androidx.appcompat.widget.SwitchCompat <com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/hardware_key_checkbox" android:id="@+id/hardware_key_checkbox"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/hardware_key_selection" android:layout_alignTop="@+id/hardware_key_selection"
android:layout_alignBottom="@+id/hardware_key_selection" android:layout_alignBottom="@+id/hardware_key_selection"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:contentDescription="@string/content_description_hardware_key_checkbox" android:contentDescription="@string/content_description_hardware_key_checkbox"
android:theme="@style/KeepassDXStyle.Switch" android:theme="?attr/switchAppearance"
android:focusable="false" android:focusable="false"
android:gravity="center_vertical" /> android:gravity="center_vertical" />

View file

@ -23,6 +23,8 @@
<attr name="toolbarSpecialAppearance" format="reference" /> <attr name="toolbarSpecialAppearance" format="reference" />
<attr name="toolbarActionAppearance" format="reference" /> <attr name="toolbarActionAppearance" format="reference" />
<attr name="switchAppearance" format="reference" />
<attr name="chipFilterTextColor" format="color" /> <attr name="chipFilterTextColor" format="color" />
<attr name="chipFilterBackgroundColor" format="color" /> <attr name="chipFilterBackgroundColor" format="color" />
<attr name="chipFilterBackgroundColorDisabled" format="color" /> <attr name="chipFilterBackgroundColorDisabled" format="color" />

View file

@ -41,6 +41,7 @@
<color name="black">#000001</color> <!-- #000001 To fix refresh theme --> <color name="black">#000001</color> <!-- #000001 To fix refresh theme -->
<color name="black_transparent">#E0000000</color> <color name="black_transparent">#E0000000</color>
<color name="blue_white_light">#F1F8FF</color>
<color name="blue_white">#E6F3FF</color> <color name="blue_white">#E6F3FF</color>
<color name="blue_white_dark">#90CAF9</color> <color name="blue_white_dark">#90CAF9</color>
<color name="blue_lighter">#5DB2F6</color> <color name="blue_lighter">#5DB2F6</color>
@ -48,12 +49,17 @@
<color name="blue">#1E88E5</color> <color name="blue">#1E88E5</color>
<color name="blue_dark">#1976D2</color> <color name="blue_dark">#1976D2</color>
<color name="blue_darker">#1565C0</color> <color name="blue_darker">#1565C0</color>
<color name="blue_black">#1D2632</color>
<color name="blue_black_dark">#161B22</color>
<color name="cyan_lightest">#33b5e5</color> <color name="cyan_lightest">#33b5e5</color>
<color name="cyan_lighter">#2B9AC3</color> <color name="cyan_lighter">#2B9AC3</color>
<color name="cyan_light">#2486AB</color> <color name="cyan_light">#2486AB</color>
<color name="cyan">#2c7a96</color> <color name="cyan">#2c7a96</color>
<color name="cyan_dark">#0E2D37</color>
<color name="green_white">#F4F8F3</color>
<color name="green_white_dark">#ebf1ea</color>
<color name="green_lightest">#a5d6a7</color> <color name="green_lightest">#a5d6a7</color>
<color name="green_lighter">#66BB6A</color> <color name="green_lighter">#66BB6A</color>
<color name="green_light">#4caf50</color> <color name="green_light">#4caf50</color>
@ -61,12 +67,17 @@
<color name="green_dark">#388e3c</color> <color name="green_dark">#388e3c</color>
<color name="green_darker">#2e7d32</color> <color name="green_darker">#2e7d32</color>
<color name="green_darkest">#1B5E20</color> <color name="green_darkest">#1B5E20</color>
<color name="green_black_light">#24352A</color>
<color name="green_black">#202923</color>
<color name="red_white_light">#FCE6E8</color>
<color name="red_lightest">#ef9a9a</color> <color name="red_lightest">#ef9a9a</color>
<color name="red_lighter">#EF5350</color> <color name="red_lighter">#EF5350</color>
<color name="red_light">#f44336</color> <color name="red_light">#f44336</color>
<color name="red">#e53935</color> <color name="red">#e53935</color>
<color name="red_dark">#d32f2f</color> <color name="red_dark">#d32f2f</color>
<color name="red_black">#422429</color>
<color name="red_black_dark">#332023</color>
<color name="orange_lightest">#FFCC80</color> <color name="orange_lightest">#FFCC80</color>
<color name="orange_lighter">#ffa726</color> <color name="orange_lighter">#ffa726</color>

View file

@ -58,7 +58,7 @@
<item name="android:textAppearance">@style/KeepassDXStyle.TextAppearance</item> <item name="android:textAppearance">@style/KeepassDXStyle.TextAppearance</item>
<item name="android:textAppearanceMedium">@style/KeepassDXStyle.TextAppearance</item> <item name="android:textAppearanceMedium">@style/KeepassDXStyle.TextAppearance</item>
<item name="android:windowBackground">@color/white_dark</item> <item name="android:windowBackground">@color/green_white_dark</item>
<item name="cardBackgroundTransparentColor">#DDFFFFFF</item> <item name="cardBackgroundTransparentColor">#DDFFFFFF</item>
<item name="android:textColor">@color/text_color_light</item> <item name="android:textColor">@color/text_color_light</item>
@ -81,7 +81,7 @@
<item name="alertDialogTheme">@style/KeepassDXStyle.Light.Dialog</item> <item name="alertDialogTheme">@style/KeepassDXStyle.Light.Dialog</item>
<!-- CardView --> <!-- CardView -->
<item name="cardViewStyle">@style/KeepassDXStyle.Cardview</item> <item name="cardViewStyle">@style/KeepassDXStyle.Cardview.Light</item>
<!-- Toolbar --> <!-- Toolbar -->
<item name="toolbarStyle">@style/Widget.AppCompat.Toolbar</item> <item name="toolbarStyle">@style/Widget.AppCompat.Toolbar</item>
@ -94,7 +94,10 @@
<item name="collapsedTitleTextAppearance">@style/KeepassDXStyle.Collapsed.Title</item> <item name="collapsedTitleTextAppearance">@style/KeepassDXStyle.Collapsed.Title</item>
<!-- Switch --> <!-- Switch -->
<item name="materialSwitchStyle">@style/KeepassDXStyle.Switch</item> <item name="android:switchPreferenceStyle">@style/KeepassDXStyle.SwitchPreference</item>
<item name="switchPreferenceStyle">@style/KeepassDXStyle.SwitchPreference</item>
<item name="switchPreferenceCompatStyle">@style/KeepassDXStyle.SwitchPreference</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Light</item>
<!-- Chip --> <!-- Chip -->
<item name="chipFilterTextColor">@color/white</item> <item name="chipFilterTextColor">@color/white</item>
@ -140,7 +143,7 @@
<item name="android:textAppearance">@style/KeepassDXStyle.TextAppearance</item> <item name="android:textAppearance">@style/KeepassDXStyle.TextAppearance</item>
<item name="android:textAppearanceMedium">@style/KeepassDXStyle.TextAppearance</item> <item name="android:textAppearanceMedium">@style/KeepassDXStyle.TextAppearance</item>
<item name="android:windowBackground">@color/grey_dark</item> <item name="android:windowBackground">@color/green_black</item>
<item name="cardBackgroundTransparentColor">@color/grey_dark_transparent</item> <item name="cardBackgroundTransparentColor">@color/grey_dark_transparent</item>
<item name="android:textColor">@color/text_color_night</item> <item name="android:textColor">@color/text_color_night</item>
@ -163,7 +166,7 @@
<item name="alertDialogTheme">@style/KeepassDXStyle.Night.Dialog</item> <item name="alertDialogTheme">@style/KeepassDXStyle.Night.Dialog</item>
<!-- CardView --> <!-- CardView -->
<item name="cardViewStyle">@style/KeepassDXStyle.Cardview</item> <item name="cardViewStyle">@style/KeepassDXStyle.Cardview.Night</item>
<!-- Toolbar --> <!-- Toolbar -->
<item name="toolbarStyle">@style/Widget.AppCompat.Toolbar</item> <item name="toolbarStyle">@style/Widget.AppCompat.Toolbar</item>
@ -176,7 +179,10 @@
<item name="collapsedTitleTextAppearance">@style/KeepassDXStyle.Collapsed.Title</item> <item name="collapsedTitleTextAppearance">@style/KeepassDXStyle.Collapsed.Title</item>
<!-- Switch --> <!-- Switch -->
<item name="materialSwitchStyle">@style/KeepassDXStyle.Switch</item> <item name="android:switchPreferenceStyle">@style/KeepassDXStyle.SwitchPreference</item>
<item name="switchPreferenceStyle">@style/KeepassDXStyle.SwitchPreference</item>
<item name="switchPreferenceCompatStyle">@style/KeepassDXStyle.SwitchPreference</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Night</item>
<!-- Chip --> <!-- Chip -->
<item name="chipFilterTextColor">@color/white</item> <item name="chipFilterTextColor">@color/white</item>
@ -290,8 +296,22 @@
</style> </style>
<!-- Switch --> <!-- Switch -->
<style name="KeepassDXStyle.Switch" parent="Theme.MaterialComponents.Bridge"> <style name="KeepassDXStyle.SwitchPreference" parent="@style/Preference.SwitchPreferenceCompat.Material">
<item name="colorAccent">@color/orange</item> <item name="widgetLayout">@layout/preference_material_switch</item>
</style>
<style name="KeepassDXStyle.Switch.Light" parent="KeepassDXStyle.Light">
<item name="colorOnPrimary">@color/white</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">?attr/colorPrimary</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
<style name="KeepassDXStyle.Switch.Night" parent="KeepassDXStyle.Night">
<item name="colorOnPrimary">@color/green_black_light</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">?attr/colorPrimary</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style> </style>
<!-- Chip --> <!-- Chip -->
@ -322,8 +342,8 @@
<style name="KeepassDXStyle.Light.Dialog" parent="Theme.Material3.Light.Dialog.Alert"> <style name="KeepassDXStyle.Light.Dialog" parent="Theme.Material3.Light.Dialog.Alert">
<item name="colorAccent">@color/orange</item> <item name="colorAccent">@color/orange</item>
<item name="android:textColorPrimary">@color/green</item> <item name="android:textColorPrimary">@color/green</item>
<item name="android:background">@color/white_dark</item> <item name="android:background">@color/green_white</item>
<item name="background">@color/white_dark</item> <item name="background">@color/green_white</item>
<item name="android:windowSoftInputMode">adjustResize</item> <item name="android:windowSoftInputMode">adjustResize</item>
<item name="buttonBarNegativeButtonStyle">@style/KeepassDXStyle.Light.Dialog.NegativeButtonStyle</item> <item name="buttonBarNegativeButtonStyle">@style/KeepassDXStyle.Light.Dialog.NegativeButtonStyle</item>
<item name="buttonBarPositiveButtonStyle">@style/KeepassDXStyle.Light.Dialog.PositiveButtonStyle</item> <item name="buttonBarPositiveButtonStyle">@style/KeepassDXStyle.Light.Dialog.PositiveButtonStyle</item>
@ -337,7 +357,7 @@
<style name="KeepassDXStyle.Light.DateTime.Dialog" parent="Theme.Material3.Light.Dialog"> <style name="KeepassDXStyle.Light.DateTime.Dialog" parent="Theme.Material3.Light.Dialog">
<item name="colorAccent">@color/orange</item> <item name="colorAccent">@color/orange</item>
<item name="android:textColorPrimary">@color/green_dark</item> <item name="android:textColorPrimary">@color/green_dark</item>
<item name="android:windowBackground">@color/white_dark</item> <item name="android:windowBackground">@color/green_white</item>
</style> </style>
<style name="KeepassDXStyle.Night.Dialog" parent="Theme.Material3.Dark.Dialog.Alert"> <style name="KeepassDXStyle.Night.Dialog" parent="Theme.Material3.Dark.Dialog.Alert">
@ -370,7 +390,13 @@
<item name="android:layout_marginLeft">@dimen/card_view_margin_horizontal</item> <item name="android:layout_marginLeft">@dimen/card_view_margin_horizontal</item>
<item name="android:layout_marginRight">@dimen/card_view_margin_horizontal</item> <item name="android:layout_marginRight">@dimen/card_view_margin_horizontal</item>
<item name="android:padding">@dimen/card_view_padding</item> <item name="android:padding">@dimen/card_view_padding</item>
<item name="cardCornerRadius">18dp</item> <item name="cardCornerRadius">16dp</item>
</style>
<style name="KeepassDXStyle.Cardview.Light" parent="KeepassDXStyle.Cardview">
<item name="cardBackgroundColor">@color/green_white</item>
</style>
<style name="KeepassDXStyle.Cardview.Night" parent="KeepassDXStyle.Cardview">
<item name="cardBackgroundColor">@color/green_black_light</item>
</style> </style>
<!-- CheckBox --> <!-- CheckBox -->

View file

@ -57,6 +57,8 @@
<item name="chipFilterTextColor">@color/text_color_light</item> <item name="chipFilterTextColor">@color/text_color_light</item>
<item name="chipFilterBackgroundColor">@color/white_darkest</item> <item name="chipFilterBackgroundColor">@color/white_darkest</item>
<item name="chipFilterBackgroundColorDisabled">@color/white_grey_lighter</item> <item name="chipFilterBackgroundColorDisabled">@color/white_grey_lighter</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Clear</item>
</style> </style>
<!-- Toolbar Style Clear --> <!-- Toolbar Style Clear -->
<style name="KeepassDXStyle.Toolbar.Clear" parent="KeepassDXStyle.Clear"> <style name="KeepassDXStyle.Toolbar.Clear" parent="KeepassDXStyle.Clear">
@ -101,7 +103,7 @@
</style> </style>
<!-- CardView --> <!-- CardView -->
<style name="KeepassDXStyle.Cardview.Clear" parent="KeepassDXStyle.Cardview"> <style name="KeepassDXStyle.Cardview.Clear" parent="KeepassDXStyle.Cardview">
<item name="cardBackgroundColor">@color/white_grey_lighter</item> <item name="cardBackgroundColor">@color/white_darkest</item>
</style> </style>
<!-- Classic Dark Style --> <!-- Classic Dark Style -->
@ -130,6 +132,8 @@
<item name="chipFilterTextColor">@color/white</item> <item name="chipFilterTextColor">@color/white</item>
<item name="chipFilterBackgroundColor">@color/black_lighter</item> <item name="chipFilterBackgroundColor">@color/black_lighter</item>
<item name="chipFilterBackgroundColorDisabled">@color/grey_darker</item> <item name="chipFilterBackgroundColorDisabled">@color/grey_darker</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Dark</item>
</style> </style>
<!-- Toolbar Style Dark --> <!-- Toolbar Style Dark -->
<style name="KeepassDXStyle.Toolbar.Dark" parent="KeepassDXStyle.Dark"> <style name="KeepassDXStyle.Toolbar.Dark" parent="KeepassDXStyle.Dark">
@ -172,4 +176,21 @@
<style name="KeepassDXStyle.Cardview.Dark" parent="KeepassDXStyle.Cardview"> <style name="KeepassDXStyle.Cardview.Dark" parent="KeepassDXStyle.Cardview">
<item name="cardBackgroundColor">@color/black_light</item> <item name="cardBackgroundColor">@color/black_light</item>
</style> </style>
<!-- Switch -->
<style name="KeepassDXStyle.Switch.Clear" parent="KeepassDXStyle.Clear">
<item name="colorPrimary">@color/cyan_lighter</item>
<item name="colorOnPrimary">?android:attr/windowBackground</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">?attr/colorPrimary</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
<style name="KeepassDXStyle.Switch.Dark" parent="KeepassDXStyle.Dark">
<item name="colorPrimary">@color/cyan_lighter</item>
<item name="colorOnPrimary">?android:attr/windowBackground</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">?attr/colorPrimary</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
</resources> </resources>

View file

@ -59,6 +59,8 @@
<item name="chipFilterTextColor">@color/grey_light</item> <item name="chipFilterTextColor">@color/grey_light</item>
<item name="chipFilterBackgroundColor">@color/white_darkest</item> <item name="chipFilterBackgroundColor">@color/white_darkest</item>
<item name="chipFilterBackgroundColorDisabled">@color/white</item> <item name="chipFilterBackgroundColorDisabled">@color/white</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.White</item>
</style> </style>
<!-- Toolbar Style White --> <!-- Toolbar Style White -->
<style name="KeepassDXStyle.Toolbar.White" parent="KeepassDXStyle.White"> <style name="KeepassDXStyle.Toolbar.White" parent="KeepassDXStyle.White">
@ -137,6 +139,8 @@
<item name="chipFilterTextColor">@color/white</item> <item name="chipFilterTextColor">@color/white</item>
<item name="chipFilterBackgroundColor">@color/grey_darker</item> <item name="chipFilterBackgroundColor">@color/grey_darker</item>
<item name="chipFilterBackgroundColorDisabled">@color/black_light</item> <item name="chipFilterBackgroundColorDisabled">@color/black_light</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Black</item>
</style> </style>
<!-- Toolbar Style Black --> <!-- Toolbar Style Black -->
<style name="KeepassDXStyle.Toolbar.Black" parent="KeepassDXStyle.Black"> <style name="KeepassDXStyle.Toolbar.Black" parent="KeepassDXStyle.Black">
@ -185,4 +189,21 @@
<style name="KeepassDXStyle.Cardview.Black" parent="KeepassDXStyle.Cardview"> <style name="KeepassDXStyle.Cardview.Black" parent="KeepassDXStyle.Cardview">
<item name="cardBackgroundColor">@color/black_light</item> <item name="cardBackgroundColor">@color/black_light</item>
</style> </style>
<!-- Switch -->
<style name="KeepassDXStyle.Switch.White" parent="KeepassDXStyle.White">
<item name="colorPrimary">@color/orange</item>
<item name="colorOnPrimary">?android:attr/windowBackground</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">?attr/colorPrimary</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
<style name="KeepassDXStyle.Switch.Black" parent="KeepassDXStyle.Black">
<item name="colorPrimary">@color/orange_darker</item>
<item name="colorOnPrimary">?android:attr/windowBackground</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">?attr/colorPrimary</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
</resources> </resources>

View file

@ -45,6 +45,8 @@
<item name="chipFilterTextColor">@color/white_purple_light</item> <item name="chipFilterTextColor">@color/white_purple_light</item>
<item name="chipFilterBackgroundColor">@color/purple_light</item> <item name="chipFilterBackgroundColor">@color/purple_light</item>
<item name="chipFilterBackgroundColorDisabled">@color/purple</item> <item name="chipFilterBackgroundColorDisabled">@color/purple</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Purple</item>
</style> </style>
<!-- Toolbar Style Purple --> <!-- Toolbar Style Purple -->
<style name="KeepassDXStyle.Toolbar.Purple" parent="KeepassDXStyle.Purple"> <style name="KeepassDXStyle.Toolbar.Purple" parent="KeepassDXStyle.Purple">
@ -123,6 +125,8 @@
<item name="chipFilterTextColor">@color/white_purple_light</item> <item name="chipFilterTextColor">@color/white_purple_light</item>
<item name="chipFilterBackgroundColor">@color/purple_dark</item> <item name="chipFilterBackgroundColor">@color/purple_dark</item>
<item name="chipFilterBackgroundColorDisabled">@color/purple_darker</item> <item name="chipFilterBackgroundColorDisabled">@color/purple_darker</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Purple.Dark</item>
</style> </style>
<!-- Toolbar Style Purple --> <!-- Toolbar Style Purple -->
<style name="KeepassDXStyle.Toolbar.Purple.Dark" parent="KeepassDXStyle.Purple.Dark"> <style name="KeepassDXStyle.Toolbar.Purple.Dark" parent="KeepassDXStyle.Purple.Dark">
@ -172,4 +176,21 @@
<style name="KeepassDXStyle.Cardview.Purple.Dark" parent="KeepassDXStyle.Cardview"> <style name="KeepassDXStyle.Cardview.Purple.Dark" parent="KeepassDXStyle.Cardview">
<item name="cardBackgroundColor">@color/black_purple</item> <item name="cardBackgroundColor">@color/black_purple</item>
</style> </style>
<!-- Switch -->
<style name="KeepassDXStyle.Switch.Purple" parent="KeepassDXStyle.Purple">
<item name="colorPrimary">@color/purple</item>
<item name="colorOnPrimary">@color/white_purple_light</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">@color/purple_light</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
<style name="KeepassDXStyle.Switch.Purple.Dark" parent="KeepassDXStyle.Purple.Dark">
<item name="colorPrimary">@color/purple</item>
<item name="colorOnPrimary">@color/purple_darker</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">@color/purple_dark</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
</resources> </resources>

View file

@ -29,7 +29,7 @@
<item name="android:textColorPrimary">@color/blue_light</item> <item name="android:textColorPrimary">@color/blue_light</item>
<item name="android:textColorHintInverse">@color/blue_white_dark</item> <item name="android:textColorHintInverse">@color/blue_white_dark</item>
<item name="android:textColorSecondaryInverse">@color/blue_white_dark</item> <item name="android:textColorSecondaryInverse">@color/blue_white_dark</item>
<item name="android:windowBackground">@color/white_dark</item> <item name="android:windowBackground">@color/blue_white</item>
<item name="toolbarColorControl">@color/white</item> <item name="toolbarColorControl">@color/white</item>
<item name="toolbarAppearance">@style/KeepassDXStyle.Toolbar.Blue</item> <item name="toolbarAppearance">@style/KeepassDXStyle.Toolbar.Blue</item>
<item name="toolbarHomeAppearance">@style/KeepassDXStyle.Toolbar.Home.Blue</item> <item name="toolbarHomeAppearance">@style/KeepassDXStyle.Toolbar.Home.Blue</item>
@ -37,12 +37,15 @@
<item name="toolbarActionAppearance">@style/KeepassDXStyle.Toolbar.Action.Blue</item> <item name="toolbarActionAppearance">@style/KeepassDXStyle.Toolbar.Action.Blue</item>
<item name="android:alertDialogTheme">@style/KeepassDXStyle.Blue.Dialog</item> <item name="android:alertDialogTheme">@style/KeepassDXStyle.Blue.Dialog</item>
<item name="alertDialogTheme">@style/KeepassDXStyle.Blue.Dialog</item> <item name="alertDialogTheme">@style/KeepassDXStyle.Blue.Dialog</item>
<item name="cardViewStyle">@style/KeepassDXStyle.Cardview.Blue</item>
<item name="educationCircleColor">@color/blue_dark</item> <item name="educationCircleColor">@color/blue_dark</item>
<item name="educationTextColor">@color/white</item> <item name="educationTextColor">@color/white</item>
<item name="chipFilterTextColor">@color/white</item> <item name="chipFilterTextColor">@color/white</item>
<item name="chipFilterBackgroundColor">@color/blue_light</item> <item name="chipFilterBackgroundColor">@color/blue_light</item>
<item name="chipFilterBackgroundColorDisabled">@color/blue</item> <item name="chipFilterBackgroundColorDisabled">@color/blue</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Blue</item>
</style> </style>
<!-- Toolbar Style Blue --> <!-- Toolbar Style Blue -->
<style name="KeepassDXStyle.Toolbar.Blue" parent="KeepassDXStyle.Blue"> <style name="KeepassDXStyle.Toolbar.Blue" parent="KeepassDXStyle.Blue">
@ -95,19 +98,22 @@
<item name="android:textColorPrimary">@color/blue_light</item> <item name="android:textColorPrimary">@color/blue_light</item>
<item name="android:textColorHintInverse">@color/blue_white_dark</item> <item name="android:textColorHintInverse">@color/blue_white_dark</item>
<item name="android:textColorSecondaryInverse">@color/blue_white_dark</item> <item name="android:textColorSecondaryInverse">@color/blue_white_dark</item>
<item name="android:windowBackground">@color/grey_dark</item> <item name="android:windowBackground">@color/blue_black_dark</item>
<item name="toolbarAppearance">@style/KeepassDXStyle.Toolbar.Blue.Night</item> <item name="toolbarAppearance">@style/KeepassDXStyle.Toolbar.Blue.Night</item>
<item name="toolbarHomeAppearance">@style/KeepassDXStyle.Toolbar.Home.Blue.Night</item> <item name="toolbarHomeAppearance">@style/KeepassDXStyle.Toolbar.Home.Blue.Night</item>
<item name="toolbarSpecialAppearance">@style/KeepassDXStyle.Toolbar.Special.Blue.Night</item> <item name="toolbarSpecialAppearance">@style/KeepassDXStyle.Toolbar.Special.Blue.Night</item>
<item name="toolbarActionAppearance">@style/KeepassDXStyle.Toolbar.Action.Blue.Night</item> <item name="toolbarActionAppearance">@style/KeepassDXStyle.Toolbar.Action.Blue.Night</item>
<item name="android:alertDialogTheme">@style/KeepassDXStyle.Blue.Night.Dialog</item> <item name="android:alertDialogTheme">@style/KeepassDXStyle.Blue.Night.Dialog</item>
<item name="alertDialogTheme">@style/KeepassDXStyle.Blue.Night.Dialog</item> <item name="alertDialogTheme">@style/KeepassDXStyle.Blue.Night.Dialog</item>
<item name="cardViewStyle">@style/KeepassDXStyle.Cardview.Blue.Night</item>
<item name="educationCircleColor">@color/blue_dark</item> <item name="educationCircleColor">@color/blue_dark</item>
<item name="educationTextColor">@color/white</item> <item name="educationTextColor">@color/white</item>
<item name="chipFilterTextColor">@color/white</item> <item name="chipFilterTextColor">@color/white</item>
<item name="chipFilterBackgroundColor">@color/blue_light</item> <item name="chipFilterBackgroundColor">@color/blue_light</item>
<item name="chipFilterBackgroundColorDisabled">@color/blue</item> <item name="chipFilterBackgroundColorDisabled">@color/blue</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Blue.Night</item>
</style> </style>
<!-- Toolbar Style Blue --> <!-- Toolbar Style Blue -->
<style name="KeepassDXStyle.Toolbar.Blue.Night" parent="KeepassDXStyle.Blue.Night"> <style name="KeepassDXStyle.Toolbar.Blue.Night" parent="KeepassDXStyle.Blue.Night">
@ -147,4 +153,26 @@
<item name="android:textColorPrimary">@color/blue</item> <item name="android:textColorPrimary">@color/blue</item>
<item name="android:windowBackground">@color/grey_dark</item> <item name="android:windowBackground">@color/grey_dark</item>
</style> </style>
<!-- CardView -->
<style name="KeepassDXStyle.Cardview.Blue" parent="KeepassDXStyle.Cardview">
<item name="cardBackgroundColor">@color/blue_white_light</item>
</style>
<style name="KeepassDXStyle.Cardview.Blue.Night" parent="KeepassDXStyle.Cardview">
<item name="cardBackgroundColor">@color/blue_black</item>
</style>
<!-- Switch -->
<style name="KeepassDXStyle.Switch.Blue" parent="KeepassDXStyle.Blue">
<item name="colorOnPrimary">@color/blue_white_light</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">@color/blue_lighter</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
<style name="KeepassDXStyle.Switch.Blue.Night" parent="KeepassDXStyle.Blue.Night">
<item name="colorOnPrimary">@color/blue_black_dark</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">@color/blue_lighter</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
</resources> </resources>

View file

@ -45,6 +45,8 @@
<item name="chipFilterTextColor">@color/reply_black</item> <item name="chipFilterTextColor">@color/reply_black</item>
<item name="chipFilterBackgroundColor">@color/reply_orange</item> <item name="chipFilterBackgroundColor">@color/reply_orange</item>
<item name="chipFilterBackgroundColorDisabled">@color/reply_blue_light</item> <item name="chipFilterBackgroundColorDisabled">@color/reply_blue_light</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Reply</item>
</style> </style>
<!-- Toolbar Style Reply --> <!-- Toolbar Style Reply -->
<style name="KeepassDXStyle.Toolbar.Reply" parent="KeepassDXStyle.Reply"> <style name="KeepassDXStyle.Toolbar.Reply" parent="KeepassDXStyle.Reply">
@ -120,6 +122,8 @@
<item name="chipFilterTextColor">@color/reply_black</item> <item name="chipFilterTextColor">@color/reply_black</item>
<item name="chipFilterBackgroundColor">@color/reply_orange</item> <item name="chipFilterBackgroundColor">@color/reply_orange</item>
<item name="chipFilterBackgroundColorDisabled">@color/reply_blue_light</item> <item name="chipFilterBackgroundColorDisabled">@color/reply_blue_light</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Reply.Night</item>
</style> </style>
<!-- Toolbar Style Reply --> <!-- Toolbar Style Reply -->
<style name="KeepassDXStyle.Toolbar.Reply.Night" parent="KeepassDXStyle.Reply.Night"> <style name="KeepassDXStyle.Toolbar.Reply.Night" parent="KeepassDXStyle.Reply.Night">
@ -169,4 +173,21 @@
<style name="KeepassDXStyle.Cardview.Reply.Night" parent="KeepassDXStyle.Cardview"> <style name="KeepassDXStyle.Cardview.Reply.Night" parent="KeepassDXStyle.Cardview">
<item name="cardBackgroundColor">@color/reply_black_dark</item> <item name="cardBackgroundColor">@color/reply_black_dark</item>
</style> </style>
<!-- Switch -->
<style name="KeepassDXStyle.Switch.Reply" parent="KeepassDXStyle.Reply">
<item name="colorPrimary">@color/reply_orange</item>
<item name="colorOnPrimary">@color/reply_blue_light</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">@color/reply_orange</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
<style name="KeepassDXStyle.Switch.Reply.Night" parent="KeepassDXStyle.Reply.Night">
<item name="colorPrimary">@color/reply_orange</item>
<item name="colorOnPrimary">@color/reply_black</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">@color/reply_orange</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
</resources> </resources>

View file

@ -57,6 +57,8 @@
<item name="chipFilterTextColor">@color/text_color_light</item> <item name="chipFilterTextColor">@color/text_color_light</item>
<item name="chipFilterBackgroundColor">@color/blue_white</item> <item name="chipFilterBackgroundColor">@color/blue_white</item>
<item name="chipFilterBackgroundColorDisabled">@color/white_dark</item> <item name="chipFilterBackgroundColorDisabled">@color/white_dark</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Simple</item>
</style> </style>
<!-- Toolbar Style Simple --> <!-- Toolbar Style Simple -->
<style name="KeepassDXStyle.Toolbar.Simple" parent="KeepassDXStyle.Simple"> <style name="KeepassDXStyle.Toolbar.Simple" parent="KeepassDXStyle.Simple">
@ -130,6 +132,8 @@
<item name="chipFilterTextColor">@color/white</item> <item name="chipFilterTextColor">@color/white</item>
<item name="chipFilterBackgroundColor">@color/grey_black_slight</item> <item name="chipFilterBackgroundColor">@color/grey_black_slight</item>
<item name="chipFilterBackgroundColorDisabled">@color/grey_darker</item> <item name="chipFilterBackgroundColorDisabled">@color/grey_darker</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Simple.Night</item>
</style> </style>
<!-- Toolbar Style Night --> <!-- Toolbar Style Night -->
<style name="KeepassDXStyle.Toolbar.Simple.Night" parent="KeepassDXStyle.Simple.Night"> <style name="KeepassDXStyle.Toolbar.Simple.Night" parent="KeepassDXStyle.Simple.Night">
@ -172,4 +176,21 @@
<style name="KeepassDXStyle.Cardview.Simple.Night" parent="KeepassDXStyle.Cardview"> <style name="KeepassDXStyle.Cardview.Simple.Night" parent="KeepassDXStyle.Cardview">
<item name="cardBackgroundColor">@color/grey_slight</item> <item name="cardBackgroundColor">@color/grey_slight</item>
</style> </style>
<!-- Switch -->
<style name="KeepassDXStyle.Switch.Simple" parent="KeepassDXStyle.Simple">
<item name="colorPrimary">@color/blue_slight</item>
<item name="colorOnPrimary">?android:attr/windowBackground</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">?attr/colorPrimary</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
<style name="KeepassDXStyle.Switch.Simple.Night" parent="KeepassDXStyle.Simple.Night">
<item name="colorPrimary">@color/blue_slight</item>
<item name="colorOnPrimary">?android:attr/windowBackground</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">?attr/colorPrimary</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
</resources> </resources>

View file

@ -29,7 +29,7 @@
<item name="android:textColorPrimary">@color/red</item> <item name="android:textColorPrimary">@color/red</item>
<item name="android:textColorHintInverse">@color/red_lightest</item> <item name="android:textColorHintInverse">@color/red_lightest</item>
<item name="android:textColorSecondaryInverse">@color/red_lightest</item> <item name="android:textColorSecondaryInverse">@color/red_lightest</item>
<item name="android:windowBackground">@color/white_dark</item> <item name="android:windowBackground">@color/red_white_light</item>
<item name="toolbarColorControl">@color/white</item> <item name="toolbarColorControl">@color/white</item>
<item name="toolbarAppearance">@style/KeepassDXStyle.Toolbar.Red</item> <item name="toolbarAppearance">@style/KeepassDXStyle.Toolbar.Red</item>
<item name="toolbarHomeAppearance">@style/KeepassDXStyle.Toolbar.Home.Red</item> <item name="toolbarHomeAppearance">@style/KeepassDXStyle.Toolbar.Home.Red</item>
@ -37,12 +37,15 @@
<item name="toolbarActionAppearance">@style/KeepassDXStyle.Toolbar.Action.Red</item> <item name="toolbarActionAppearance">@style/KeepassDXStyle.Toolbar.Action.Red</item>
<item name="android:alertDialogTheme">@style/KeepassDXStyle.Red.Dialog</item> <item name="android:alertDialogTheme">@style/KeepassDXStyle.Red.Dialog</item>
<item name="alertDialogTheme">@style/KeepassDXStyle.Red.Dialog</item> <item name="alertDialogTheme">@style/KeepassDXStyle.Red.Dialog</item>
<item name="cardViewStyle">@style/KeepassDXStyle.Cardview.Red</item>
<item name="educationCircleColor">@color/red_dark</item> <item name="educationCircleColor">@color/red_dark</item>
<item name="educationTextColor">@color/white</item> <item name="educationTextColor">@color/white</item>
<item name="chipFilterTextColor">@color/white</item> <item name="chipFilterTextColor">@color/white</item>
<item name="chipFilterBackgroundColor">@color/red_lighter</item> <item name="chipFilterBackgroundColor">@color/red_lighter</item>
<item name="chipFilterBackgroundColorDisabled">@color/red</item> <item name="chipFilterBackgroundColorDisabled">@color/red</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Red</item>
</style> </style>
<!-- Toolbar Style Red --> <!-- Toolbar Style Red -->
<style name="KeepassDXStyle.Toolbar.Red" parent="KeepassDXStyle.Red"> <style name="KeepassDXStyle.Toolbar.Red" parent="KeepassDXStyle.Red">
@ -94,19 +97,22 @@
<item name="android:textColorPrimary">@color/red</item> <item name="android:textColorPrimary">@color/red</item>
<item name="android:textColorHintInverse">@color/red_lightest</item> <item name="android:textColorHintInverse">@color/red_lightest</item>
<item name="android:textColorSecondaryInverse">@color/red_lightest</item> <item name="android:textColorSecondaryInverse">@color/red_lightest</item>
<item name="android:windowBackground">@color/grey_dark</item> <item name="android:windowBackground">@color/red_black_dark</item>
<item name="toolbarAppearance">@style/KeepassDXStyle.Toolbar.Red.Night</item> <item name="toolbarAppearance">@style/KeepassDXStyle.Toolbar.Red.Night</item>
<item name="toolbarHomeAppearance">@style/KeepassDXStyle.Toolbar.Home.Red.Night</item> <item name="toolbarHomeAppearance">@style/KeepassDXStyle.Toolbar.Home.Red.Night</item>
<item name="toolbarSpecialAppearance">@style/KeepassDXStyle.Toolbar.Special.Red.Night</item> <item name="toolbarSpecialAppearance">@style/KeepassDXStyle.Toolbar.Special.Red.Night</item>
<item name="toolbarActionAppearance">@style/KeepassDXStyle.Toolbar.Action.Red.Night</item> <item name="toolbarActionAppearance">@style/KeepassDXStyle.Toolbar.Action.Red.Night</item>
<item name="android:alertDialogTheme">@style/KeepassDXStyle.Red.Night.Dialog</item> <item name="android:alertDialogTheme">@style/KeepassDXStyle.Red.Night.Dialog</item>
<item name="alertDialogTheme">@style/KeepassDXStyle.Red.Night.Dialog</item> <item name="alertDialogTheme">@style/KeepassDXStyle.Red.Night.Dialog</item>
<item name="cardViewStyle">@style/KeepassDXStyle.Cardview.Red.Night</item>
<item name="educationCircleColor">@color/red_dark</item> <item name="educationCircleColor">@color/red_dark</item>
<item name="educationTextColor">@color/white</item> <item name="educationTextColor">@color/white</item>
<item name="chipFilterTextColor">@color/white</item> <item name="chipFilterTextColor">@color/white</item>
<item name="chipFilterBackgroundColor">@color/red_lighter</item> <item name="chipFilterBackgroundColor">@color/red_lighter</item>
<item name="chipFilterBackgroundColorDisabled">@color/red</item> <item name="chipFilterBackgroundColorDisabled">@color/red</item>
<item name="switchAppearance">@style/KeepassDXStyle.Switch.Red.Night</item>
</style> </style>
<!-- Toolbar Style Red --> <!-- Toolbar Style Red -->
<style name="KeepassDXStyle.Toolbar.Red.Night" parent="KeepassDXStyle.Red.Night"> <style name="KeepassDXStyle.Toolbar.Red.Night" parent="KeepassDXStyle.Red.Night">
@ -146,4 +152,28 @@
<item name="android:textColorPrimary">@color/orange</item> <item name="android:textColorPrimary">@color/orange</item>
<item name="android:windowBackground">@color/grey_dark</item> <item name="android:windowBackground">@color/grey_dark</item>
</style> </style>
<!-- CardView -->
<style name="KeepassDXStyle.Cardview.Red" parent="KeepassDXStyle.Cardview">
<item name="cardBackgroundColor">@color/red_white_light</item>
</style>
<style name="KeepassDXStyle.Cardview.Red.Night" parent="KeepassDXStyle.Cardview">
<item name="cardBackgroundColor">@color/red_black</item>
</style>
<!-- Switch -->
<style name="KeepassDXStyle.Switch.Red" parent="KeepassDXStyle.Red">
<item name="colorPrimary">@color/orange</item>
<item name="colorOnPrimary">@color/red_white_light</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">@color/orange</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
<style name="KeepassDXStyle.Switch.Red.Night" parent="KeepassDXStyle.Red.Night">
<item name="colorPrimary">@color/orange_dark</item>
<item name="colorOnPrimary">@color/red_black_dark</item>
<item name="colorOnAccentColor">@color/white</item>
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
<item name="colorOutline">@color/orange_dark</item>
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
</style>
</resources> </resources>

View file

@ -24,17 +24,17 @@
android:key="@string/advanced_unlock_explanation_key" android:key="@string/advanced_unlock_explanation_key"
android:icon="@drawable/prefs_info_24dp" android:icon="@drawable/prefs_info_24dp"
android:summary="@string/advanced_unlock_explanation_summary"/> android:summary="@string/advanced_unlock_explanation_summary"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/biometric_unlock_enable_key" android:key="@string/biometric_unlock_enable_key"
android:title="@string/biometric_unlock_enable_title" android:title="@string/biometric_unlock_enable_title"
android:summary="@string/biometric_unlock_enable_summary" android:summary="@string/biometric_unlock_enable_summary"
android:defaultValue="@bool/biometric_unlock_enable_default"/> android:defaultValue="@bool/biometric_unlock_enable_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/device_credential_unlock_enable_key" android:key="@string/device_credential_unlock_enable_key"
android:title="@string/device_credential_unlock_enable_title" android:title="@string/device_credential_unlock_enable_title"
android:summary="@string/device_credential_unlock_enable_summary" android:summary="@string/device_credential_unlock_enable_summary"
android:defaultValue="@bool/device_credential_unlock_enable_default"/> android:defaultValue="@bool/device_credential_unlock_enable_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/biometric_auto_open_prompt_key" android:key="@string/biometric_auto_open_prompt_key"
android:title="@string/biometric_auto_open_prompt_title" android:title="@string/biometric_auto_open_prompt_title"
android:summary="@string/biometric_auto_open_prompt_summary" android:summary="@string/biometric_auto_open_prompt_summary"
@ -42,7 +42,7 @@
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory <PreferenceCategory
android:title="@string/content"> android:title="@string/content">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/temp_advanced_unlock_enable_key" android:key="@string/temp_advanced_unlock_enable_key"
android:title="@string/temp_advanced_unlock_enable_title" android:title="@string/temp_advanced_unlock_enable_title"
android:summary="@string/temp_advanced_unlock_enable_summary" android:summary="@string/temp_advanced_unlock_enable_summary"

View file

@ -40,7 +40,7 @@
android:key="@string/setting_icon_pack_choose_key" android:key="@string/setting_icon_pack_choose_key"
android:title="@string/icon_pack_choose_title" android:title="@string/icon_pack_choose_title"
android:summary="@string/icon_pack_choose_summary" /> android:summary="@string/icon_pack_choose_summary" />
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/show_entry_colors_key" android:key="@string/show_entry_colors_key"
android:title="@string/show_entry_colors_title" android:title="@string/show_entry_colors_title"
android:summary="@string/show_entry_colors_summary" android:summary="@string/show_entry_colors_summary"
@ -51,12 +51,12 @@
<PreferenceCategory <PreferenceCategory
android:title="@string/password"> android:title="@string/password">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/hide_password_key" android:key="@string/hide_password_key"
android:title="@string/hide_password_title" android:title="@string/hide_password_title"
android:summary="@string/hide_password_summary" android:summary="@string/hide_password_summary"
android:defaultValue="@bool/hide_password_default"/> android:defaultValue="@bool/hide_password_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/colorize_password_key" android:key="@string/colorize_password_key"
android:title="@string/colorize_password_title" android:title="@string/colorize_password_title"
android:summary="@string/colorize_password_summary" android:summary="@string/colorize_password_summary"
@ -67,22 +67,22 @@
<PreferenceCategory <PreferenceCategory
android:title="@string/text_appearance"> android:title="@string/text_appearance">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/list_entries_show_username_key" android:key="@string/list_entries_show_username_key"
android:title="@string/list_entries_show_username_title" android:title="@string/list_entries_show_username_title"
android:summary="@string/list_entries_show_username_summary" android:summary="@string/list_entries_show_username_summary"
android:defaultValue="@bool/list_entries_show_username_default"/> android:defaultValue="@bool/list_entries_show_username_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/list_groups_show_number_entries_key" android:key="@string/list_groups_show_number_entries_key"
android:title="@string/list_groups_show_number_entries_title" android:title="@string/list_groups_show_number_entries_title"
android:summary="@string/list_groups_show_number_entries_summary" android:summary="@string/list_groups_show_number_entries_summary"
android:defaultValue="@bool/list_groups_show_number_entries_default"/> android:defaultValue="@bool/list_groups_show_number_entries_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/show_otp_token_key" android:key="@string/show_otp_token_key"
android:title="@string/show_otp_token_title" android:title="@string/show_otp_token_title"
android:summary="@string/show_otp_token_summary" android:summary="@string/show_otp_token_summary"
android:defaultValue="@bool/show_otp_token_default"/> android:defaultValue="@bool/show_otp_token_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/show_uuid_key" android:key="@string/show_uuid_key"
android:title="@string/show_uuid_title" android:title="@string/show_uuid_title"
android:summary="@string/show_uuid_summary" android:summary="@string/show_uuid_summary"
@ -95,7 +95,7 @@
android:entryValues="@array/list_size_string_values" android:entryValues="@array/list_size_string_values"
android:dialogTitle="@string/list_size_summary" android:dialogTitle="@string/list_size_summary"
android:defaultValue="@string/list_size_string_medium"/> android:defaultValue="@string/list_size_string_medium"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/monospace_font_fields_enable_key" android:key="@string/monospace_font_fields_enable_key"
android:title="@string/monospace_font_fields_enable_title" android:title="@string/monospace_font_fields_enable_title"
android:summary="@string/monospace_font_fields_enable_summary" android:summary="@string/monospace_font_fields_enable_summary"
@ -106,12 +106,12 @@
<PreferenceCategory <PreferenceCategory
android:title="@string/other"> android:title="@string/other">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/hide_expired_entries_key" android:key="@string/hide_expired_entries_key"
android:title="@string/hide_expired_entries_title" android:title="@string/hide_expired_entries_title"
android:summary="@string/hide_expired_entries_summary" android:summary="@string/hide_expired_entries_summary"
android:defaultValue="@bool/hide_expired_entries_default"/> android:defaultValue="@bool/hide_expired_entries_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/enable_education_screens_key" android:key="@string/enable_education_screens_key"
android:title="@string/enable_education_screens_title" android:title="@string/enable_education_screens_title"
android:summary="@string/enable_education_screens_summary" android:summary="@string/enable_education_screens_summary"

View file

@ -22,32 +22,32 @@
<PreferenceCategory <PreferenceCategory
android:title="@string/general"> android:title="@string/general">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/allow_no_password_key" android:key="@string/allow_no_password_key"
android:title="@string/allow_no_password_title" android:title="@string/allow_no_password_title"
android:summary="@string/allow_no_password_summary" android:summary="@string/allow_no_password_summary"
android:defaultValue="@bool/allow_no_password_default"/> android:defaultValue="@bool/allow_no_password_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/delete_entered_password_key" android:key="@string/delete_entered_password_key"
android:title="@string/delete_entered_password_title" android:title="@string/delete_entered_password_title"
android:summary="@string/delete_entered_password_summary" android:summary="@string/delete_entered_password_summary"
android:defaultValue="@bool/delete_entered_password_default"/> android:defaultValue="@bool/delete_entered_password_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/enable_read_only_key" android:key="@string/enable_read_only_key"
android:title="@string/enable_read_only_title" android:title="@string/enable_read_only_title"
android:summary="@string/enable_read_only_summary" android:summary="@string/enable_read_only_summary"
android:defaultValue="@bool/enable_read_only_default"/> android:defaultValue="@bool/enable_read_only_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/enable_auto_save_database_key" android:key="@string/enable_auto_save_database_key"
android:title="@string/enable_auto_save_database_title" android:title="@string/enable_auto_save_database_title"
android:summary="@string/enable_auto_save_database_summary" android:summary="@string/enable_auto_save_database_summary"
android:defaultValue="@bool/enable_auto_save_database_default"/> android:defaultValue="@bool/enable_auto_save_database_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/enable_keep_screen_on_key" android:key="@string/enable_keep_screen_on_key"
android:title="@string/enable_keep_screen_on_title" android:title="@string/enable_keep_screen_on_title"
android:summary="@string/enable_keep_screen_on_summary" android:summary="@string/enable_keep_screen_on_summary"
android:defaultValue="@bool/enable_keep_screen_on_default"/> android:defaultValue="@bool/enable_keep_screen_on_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/enable_screenshot_mode_key" android:key="@string/enable_screenshot_mode_key"
android:title="@string/enable_screenshot_mode_title" android:title="@string/enable_screenshot_mode_title"
android:summary="@string/enable_screenshot_mode_summary" android:summary="@string/enable_screenshot_mode_summary"
@ -58,12 +58,12 @@
<PreferenceCategory <PreferenceCategory
android:title="@string/search"> android:title="@string/search">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/auto_focus_search_key" android:key="@string/auto_focus_search_key"
android:title="@string/auto_focus_search_title" android:title="@string/auto_focus_search_title"
android:summary="@string/auto_focus_search_summary" android:summary="@string/auto_focus_search_summary"
android:defaultValue="@bool/auto_focus_search_default"/> android:defaultValue="@bool/auto_focus_search_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/subdomain_search_key" android:key="@string/subdomain_search_key"
android:title="@string/subdomain_search_title" android:title="@string/subdomain_search_title"
android:summary="@string/subdomain_search_summary" android:summary="@string/subdomain_search_summary"
@ -79,17 +79,17 @@
android:summary="@string/app_timeout_summary" android:summary="@string/app_timeout_summary"
android:dialogTitle="@string/app_timeout" android:dialogTitle="@string/app_timeout"
android:defaultValue="@string/timeout_default"/> android:defaultValue="@string/timeout_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/lock_database_screen_off_key" android:key="@string/lock_database_screen_off_key"
android:title="@string/lock_database_screen_off_title" android:title="@string/lock_database_screen_off_title"
android:summary="@string/lock_database_screen_off_summary" android:summary="@string/lock_database_screen_off_summary"
android:defaultValue="@bool/lock_database_screen_off_default"/> android:defaultValue="@bool/lock_database_screen_off_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/lock_database_back_root_key" android:key="@string/lock_database_back_root_key"
android:title="@string/lock_database_back_root_title" android:title="@string/lock_database_back_root_title"
android:summary="@string/lock_database_back_root_summary" android:summary="@string/lock_database_back_root_summary"
android:defaultValue="@bool/lock_database_back_root_default"/> android:defaultValue="@bool/lock_database_back_root_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/lock_database_show_button_key" android:key="@string/lock_database_show_button_key"
android:title="@string/lock_database_show_button_title" android:title="@string/lock_database_show_button_title"
android:summary="@string/lock_database_show_button_summary" android:summary="@string/lock_database_show_button_summary"
@ -100,30 +100,30 @@
<PreferenceCategory <PreferenceCategory
android:title="@string/database_history"> android:title="@string/database_history">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/remember_database_locations_key" android:key="@string/remember_database_locations_key"
android:title="@string/remember_database_locations_title" android:title="@string/remember_database_locations_title"
android:summary="@string/remember_database_locations_summary" android:summary="@string/remember_database_locations_summary"
android:defaultValue="@bool/remember_database_locations_default"/> android:defaultValue="@bool/remember_database_locations_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/remember_keyfile_locations_key" android:key="@string/remember_keyfile_locations_key"
android:title="@string/remember_keyfile_locations_title" android:title="@string/remember_keyfile_locations_title"
android:summary="@string/remember_keyfile_locations_summary" android:summary="@string/remember_keyfile_locations_summary"
android:dependency="@string/remember_database_locations_key" android:dependency="@string/remember_database_locations_key"
android:defaultValue="@bool/remember_keyfile_locations_default"/> android:defaultValue="@bool/remember_keyfile_locations_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/remember_hardware_key_key" android:key="@string/remember_hardware_key_key"
android:title="@string/remember_hardware_key_title" android:title="@string/remember_hardware_key_title"
android:summary="@string/remember_hardware_key_summary" android:summary="@string/remember_hardware_key_summary"
android:dependency="@string/remember_database_locations_key" android:dependency="@string/remember_database_locations_key"
android:defaultValue="@bool/remember_hardware_key_default"/> android:defaultValue="@bool/remember_hardware_key_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/show_recent_files_key" android:key="@string/show_recent_files_key"
android:title="@string/show_recent_files_title" android:title="@string/show_recent_files_title"
android:summary="@string/show_recent_files_summary" android:summary="@string/show_recent_files_summary"
android:dependency="@string/remember_database_locations_key" android:dependency="@string/remember_database_locations_key"
android:defaultValue="@bool/show_recent_files_default"/> android:defaultValue="@bool/show_recent_files_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/hide_broken_locations_key" android:key="@string/hide_broken_locations_key"
android:title="@string/hide_broken_locations_title" android:title="@string/hide_broken_locations_title"
android:summary="@string/hide_broken_locations_summary" android:summary="@string/hide_broken_locations_summary"

View file

@ -20,17 +20,17 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory <PreferenceCategory
android:title="@string/general"> android:title="@string/general">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/autofill_close_database_key" android:key="@string/autofill_close_database_key"
android:title="@string/autofill_close_database_title" android:title="@string/autofill_close_database_title"
android:summary="@string/autofill_close_database_summary" android:summary="@string/autofill_close_database_summary"
android:defaultValue="@bool/autofill_close_database_default"/> android:defaultValue="@bool/autofill_close_database_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/autofill_inline_suggestions_key" android:key="@string/autofill_inline_suggestions_key"
android:title="@string/autofill_inline_suggestions_title" android:title="@string/autofill_inline_suggestions_title"
android:summary="@string/autofill_inline_suggestions_summary" android:summary="@string/autofill_inline_suggestions_summary"
android:defaultValue="@bool/autofill_inline_suggestions_default"/> android:defaultValue="@bool/autofill_inline_suggestions_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/autofill_manual_selection_key" android:key="@string/autofill_manual_selection_key"
android:title="@string/autofill_manual_selection_title" android:title="@string/autofill_manual_selection_title"
android:summary="@string/autofill_manual_selection_summary" android:summary="@string/autofill_manual_selection_summary"
@ -38,12 +38,12 @@
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory <PreferenceCategory
android:title="@string/save"> android:title="@string/save">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/autofill_save_search_info_key" android:key="@string/autofill_save_search_info_key"
android:title="@string/autofill_save_search_info_title" android:title="@string/autofill_save_search_info_title"
android:summary="@string/autofill_save_search_info_summary" android:summary="@string/autofill_save_search_info_summary"
android:defaultValue="@bool/autofill_save_search_info_default"/> android:defaultValue="@bool/autofill_save_search_info_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/autofill_ask_to_save_data_key" android:key="@string/autofill_ask_to_save_data_key"
android:title="@string/autofill_ask_to_save_data_title" android:title="@string/autofill_ask_to_save_data_title"
android:summary="@string/autofill_ask_to_save_data_summary" android:summary="@string/autofill_ask_to_save_data_summary"

View file

@ -78,7 +78,7 @@
android:key="@string/database_category_recycle_bin_key" android:key="@string/database_category_recycle_bin_key"
android:title="@string/recycle_bin"> android:title="@string/recycle_bin">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/recycle_bin_enable_key" android:key="@string/recycle_bin_enable_key"
android:persistent="false" android:persistent="false"
android:title="@string/recycle_bin_title" android:title="@string/recycle_bin_title"
@ -95,7 +95,7 @@
android:key="@string/database_category_templates_key" android:key="@string/database_category_templates_key"
android:title="@string/templates"> android:title="@string/templates">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/templates_group_enable_key" android:key="@string/templates_group_enable_key"
android:persistent="false" android:persistent="false"
android:title="@string/templates_group_enable_title" android:title="@string/templates_group_enable_title"

View file

@ -40,7 +40,7 @@
android:key="@string/autofill_explanation_key" android:key="@string/autofill_explanation_key"
android:icon="@drawable/prefs_info_24dp" android:icon="@drawable/prefs_info_24dp"
android:summary="@string/autofill_explanation_summary"/> android:summary="@string/autofill_explanation_summary"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/settings_autofill_enable_key" android:key="@string/settings_autofill_enable_key"
android:title="@string/set_autofill_service_title" android:title="@string/set_autofill_service_title"
android:defaultValue="@bool/settings_autofill_enable_default"/> android:defaultValue="@bool/settings_autofill_enable_default"/>
@ -55,12 +55,12 @@
android:key="@string/clipboard_explanation_key" android:key="@string/clipboard_explanation_key"
android:icon="@drawable/prefs_info_24dp" android:icon="@drawable/prefs_info_24dp"
android:summary="@string/clipboard_explanation_summary"/> android:summary="@string/clipboard_explanation_summary"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/clipboard_notifications_key" android:key="@string/clipboard_notifications_key"
android:title="@string/clipboard_notifications_title" android:title="@string/clipboard_notifications_title"
android:defaultValue="@bool/clipboard_notifications_default" android:defaultValue="@bool/clipboard_notifications_default"
android:summary="@string/clipboard_notifications_summary" /> android:summary="@string/clipboard_notifications_summary" />
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/clear_clipboard_notification_key" android:key="@string/clear_clipboard_notification_key"
android:title="@string/clear_clipboard_notification_title" android:title="@string/clear_clipboard_notification_title"
android:summary="@string/clear_clipboard_notification_summary" android:summary="@string/clear_clipboard_notification_summary"
@ -72,7 +72,7 @@
android:summary="@string/clipboard_timeout_summary" android:summary="@string/clipboard_timeout_summary"
android:dialogTitle="@string/clipboard_timeout" android:dialogTitle="@string/clipboard_timeout"
android:defaultValue="@string/clipboard_timeout_default"/> android:defaultValue="@string/clipboard_timeout_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/allow_copy_password_key" android:key="@string/allow_copy_password_key"
android:title="@string/allow_copy_password_title" android:title="@string/allow_copy_password_title"
android:summary="@string/allow_copy_password_summary" android:summary="@string/allow_copy_password_summary"

View file

@ -20,12 +20,12 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory <PreferenceCategory
android:title="@string/notification"> android:title="@string/notification">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/keyboard_notification_entry_key" android:key="@string/keyboard_notification_entry_key"
android:title="@string/keyboard_notification_entry_title" android:title="@string/keyboard_notification_entry_title"
android:summary="@string/keyboard_notification_entry_summary" android:summary="@string/keyboard_notification_entry_summary"
android:defaultValue="@bool/keyboard_notification_entry_default"/> android:defaultValue="@bool/keyboard_notification_entry_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/keyboard_notification_entry_clear_close_key" android:key="@string/keyboard_notification_entry_clear_close_key"
android:title="@string/keyboard_notification_entry_clear_close_title" android:title="@string/keyboard_notification_entry_clear_close_title"
android:summary="@string/keyboard_notification_entry_clear_close_summary" android:summary="@string/keyboard_notification_entry_clear_close_summary"
@ -41,7 +41,7 @@
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory <PreferenceCategory
android:title="@string/keyboard_entry_category"> android:title="@string/keyboard_entry_category">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/keyboard_selection_entry_key" android:key="@string/keyboard_selection_entry_key"
android:title="@string/keyboard_selection_entry_title" android:title="@string/keyboard_selection_entry_title"
android:summary="@string/keyboard_selection_entry_summary" android:summary="@string/keyboard_selection_entry_summary"
@ -49,7 +49,7 @@
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory <PreferenceCategory
android:title="@string/save"> android:title="@string/save">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/keyboard_save_search_info_key" android:key="@string/keyboard_save_search_info_key"
android:title="@string/keyboard_save_search_info_title" android:title="@string/keyboard_save_search_info_title"
android:summary="@string/keyboard_save_search_info_summary" android:summary="@string/keyboard_save_search_info_summary"
@ -57,39 +57,39 @@
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory <PreferenceCategory
android:title="@string/keyboard_keys_category"> android:title="@string/keyboard_keys_category">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/keyboard_auto_go_action_key" android:key="@string/keyboard_auto_go_action_key"
android:title="@string/keyboard_auto_go_action_title" android:title="@string/keyboard_auto_go_action_title"
android:summary="@string/keyboard_auto_go_action_summary" android:summary="@string/keyboard_auto_go_action_summary"
android:defaultValue="@bool/keyboard_auto_go_action_default"/> android:defaultValue="@bool/keyboard_auto_go_action_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/keyboard_key_vibrate_key" android:key="@string/keyboard_key_vibrate_key"
android:title="@string/keyboard_key_vibrate_title" android:title="@string/keyboard_key_vibrate_title"
android:defaultValue="@bool/keyboard_key_vibrate_default"/> android:defaultValue="@bool/keyboard_key_vibrate_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/keyboard_key_sound_key" android:key="@string/keyboard_key_sound_key"
android:defaultValue="@bool/keyboard_key_sound_default" android:defaultValue="@bool/keyboard_key_sound_default"
android:title="@string/keyboard_key_sound_title" /> android:title="@string/keyboard_key_sound_title" />
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory <PreferenceCategory
android:title="@string/keyboard_change"> android:title="@string/keyboard_change">
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/keyboard_previous_database_credentials_key" android:key="@string/keyboard_previous_database_credentials_key"
android:title="@string/keyboard_previous_database_credentials_title" android:title="@string/keyboard_previous_database_credentials_title"
android:summary="@string/keyboard_previous_database_credentials_summary" android:summary="@string/keyboard_previous_database_credentials_summary"
android:defaultValue="@bool/keyboard_previous_database_credentials_default"/> android:defaultValue="@bool/keyboard_previous_database_credentials_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/keyboard_previous_search_key" android:key="@string/keyboard_previous_search_key"
android:title="@string/keyboard_previous_search_title" android:title="@string/keyboard_previous_search_title"
android:summary="@string/keyboard_previous_search_summary" android:summary="@string/keyboard_previous_search_summary"
android:defaultValue="@bool/keyboard_previous_search_default"/> android:defaultValue="@bool/keyboard_previous_search_default"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/keyboard_previous_fill_in_key" android:key="@string/keyboard_previous_fill_in_key"
android:title="@string/keyboard_previous_fill_in_title" android:title="@string/keyboard_previous_fill_in_title"
android:summary="@string/keyboard_previous_fill_in_summary" android:summary="@string/keyboard_previous_fill_in_summary"
android:defaultValue="@bool/keyboard_previous_fill_in_default" android:defaultValue="@bool/keyboard_previous_fill_in_default"
android:dependency="@string/keyboard_auto_go_action_key"/> android:dependency="@string/keyboard_auto_go_action_key"/>
<SwitchPreference <SwitchPreferenceCompat
android:key="@string/keyboard_previous_lock_key" android:key="@string/keyboard_previous_lock_key"
android:title="@string/keyboard_previous_lock_title" android:title="@string/keyboard_previous_lock_title"
android:summary="@string/keyboard_previous_lock_summary" android:summary="@string/keyboard_previous_lock_summary"

View file

@ -20,7 +20,6 @@ android {
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
} }

View file

@ -11,13 +11,11 @@ android {
targetSdk 33 targetSdk 33
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
} }
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} }
} }
compileOptions { compileOptions {