mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
fix: DateTime dialog color and switch to the right
This commit is contained in:
@@ -21,26 +21,12 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<com.google.android.material.materialswitch.MaterialSwitch
|
|
||||||
android:id="@+id/password_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignTop="@+id/password_input_layout"
|
|
||||||
android:layout_alignBottom="@+id/password_input_layout"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:layout_marginRight="12dp"
|
|
||||||
android:layout_marginEnd="12dp"
|
|
||||||
android:contentDescription="@string/content_description_password_checkbox"
|
|
||||||
android:theme="?attr/switchAppearance"
|
|
||||||
android:focusable="false"
|
|
||||||
android:gravity="center_vertical" />
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/password_input_layout"
|
android:id="@+id/password_input_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_toRightOf="@+id/password_checkbox"
|
android:layout_toStartOf="@+id/password_checkbox"
|
||||||
android:layout_toEndOf="@+id/password_checkbox"
|
android:layout_toLeftOf="@+id/password_checkbox"
|
||||||
app:endIconMode="password_toggle"
|
app:endIconMode="password_toggle"
|
||||||
app:endIconTint="?attr/colorAccent">
|
app:endIconTint="?attr/colorAccent">
|
||||||
|
|
||||||
@@ -58,6 +44,22 @@
|
|||||||
android:imeOptions="actionDone|flagNoPersonalizedLearning"
|
android:imeOptions="actionDone|flagNoPersonalizedLearning"
|
||||||
android:maxLines="1"/>
|
android:maxLines="1"/>
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/password_checkbox"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignTop="@+id/password_input_layout"
|
||||||
|
android:layout_alignBottom="@+id/password_input_layout"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginLeft="12dp"
|
||||||
|
android:contentDescription="@string/content_description_password_checkbox"
|
||||||
|
android:theme="?attr/switchAppearance"
|
||||||
|
android:focusable="false"
|
||||||
|
android:gravity="center_vertical" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<!-- File Input -->
|
<!-- File Input -->
|
||||||
@@ -66,29 +68,31 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.kunzisoft.keepass.view.KeyFileSelectionView
|
||||||
|
android:id="@+id/keyfile_selection"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toStartOf="@+id/keyfile_checkbox"
|
||||||
|
android:layout_toLeftOf="@+id/keyfile_checkbox"
|
||||||
|
android:importantForAccessibility="no"
|
||||||
|
android:importantForAutofill="no"
|
||||||
|
android:minHeight="48dp" />
|
||||||
|
|
||||||
<com.google.android.material.materialswitch.MaterialSwitch
|
<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_alignParentEnd="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:layout_marginRight="12dp"
|
android:layout_marginStart="12dp"
|
||||||
android:layout_marginEnd="12dp"
|
android:layout_marginLeft="12dp"
|
||||||
android:contentDescription="@string/content_description_keyfile_checkbox"
|
android:contentDescription="@string/content_description_keyfile_checkbox"
|
||||||
android:theme="?attr/switchAppearance"
|
android:theme="?attr/switchAppearance"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
android:gravity="center_vertical" />
|
android:gravity="center_vertical" />
|
||||||
|
|
||||||
<com.kunzisoft.keepass.view.KeyFileSelectionView
|
|
||||||
android:id="@+id/keyfile_selection"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_toEndOf="@+id/keyfile_checkbox"
|
|
||||||
android:layout_toRightOf="@+id/keyfile_checkbox"
|
|
||||||
android:importantForAccessibility="no"
|
|
||||||
android:importantForAutofill="no"
|
|
||||||
android:minHeight="48dp" />
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<!-- Hardware key -->
|
<!-- Hardware key -->
|
||||||
@@ -97,28 +101,30 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.kunzisoft.keepass.view.HardwareKeySelectionView
|
||||||
|
android:id="@+id/hardware_key_selection"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toStartOf="@+id/hardware_key_checkbox"
|
||||||
|
android:layout_toLeftOf="@+id/hardware_key_checkbox"
|
||||||
|
android:importantForAccessibility="no"
|
||||||
|
android:importantForAutofill="no" />
|
||||||
|
|
||||||
<com.google.android.material.materialswitch.MaterialSwitch
|
<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_alignParentEnd="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:layout_marginRight="12dp"
|
android:layout_marginStart="12dp"
|
||||||
android:layout_marginEnd="12dp"
|
android:layout_marginLeft="12dp"
|
||||||
android:contentDescription="@string/content_description_hardware_key_checkbox"
|
android:contentDescription="@string/content_description_hardware_key_checkbox"
|
||||||
android:theme="?attr/switchAppearance"
|
android:theme="?attr/switchAppearance"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
android:gravity="center_vertical" />
|
android:gravity="center_vertical" />
|
||||||
|
|
||||||
<com.kunzisoft.keepass.view.HardwareKeySelectionView
|
|
||||||
android:id="@+id/hardware_key_selection"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_toEndOf="@+id/hardware_key_checkbox"
|
|
||||||
android:layout_toRightOf="@+id/hardware_key_checkbox"
|
|
||||||
android:importantForAccessibility="no"
|
|
||||||
android:importantForAutofill="no" />
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -110,6 +110,9 @@
|
|||||||
|
|
||||||
<!-- Edit Text -->
|
<!-- Edit Text -->
|
||||||
<item name="textInputStyle">@style/KeepassDXStyle.TextInputLayout</item>
|
<item name="textInputStyle">@style/KeepassDXStyle.TextInputLayout</item>
|
||||||
|
|
||||||
|
<!-- Snackbar -->
|
||||||
|
<item name="snackbarStyle">@style/KeepassDXStyle.SnackBar</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Night application theme -->
|
<!-- Night application theme -->
|
||||||
@@ -195,6 +198,9 @@
|
|||||||
|
|
||||||
<!-- Edit Text -->
|
<!-- Edit Text -->
|
||||||
<item name="textInputStyle">@style/KeepassDXStyle.TextInputLayout</item>
|
<item name="textInputStyle">@style/KeepassDXStyle.TextInputLayout</item>
|
||||||
|
|
||||||
|
<!-- Snackbar -->
|
||||||
|
<item name="snackbarStyle">@style/KeepassDXStyle.SnackBar</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Light WhiteBar Style -->
|
<!-- Light WhiteBar Style -->
|
||||||
@@ -300,17 +306,19 @@
|
|||||||
<item name="widgetLayout">@layout/preference_material_switch</item>
|
<item name="widgetLayout">@layout/preference_material_switch</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="KeepassDXStyle.Switch.Light" parent="KeepassDXStyle.Light">
|
<style name="KeepassDXStyle.Switch.Light" parent="KeepassDXStyle.Light">
|
||||||
<item name="colorOnPrimary">@color/white</item>
|
<item name="colorPrimary">@color/orange</item>
|
||||||
|
<item name="colorOnPrimary">@color/green_white_dark</item>
|
||||||
<item name="colorOnAccentColor">@color/white</item>
|
<item name="colorOnAccentColor">@color/white</item>
|
||||||
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
|
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
|
||||||
<item name="colorOutline">?attr/colorPrimary</item>
|
<item name="colorOutline">@color/orange</item>
|
||||||
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
|
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="KeepassDXStyle.Switch.Night" parent="KeepassDXStyle.Night">
|
<style name="KeepassDXStyle.Switch.Night" parent="KeepassDXStyle.Night">
|
||||||
|
<item name="colorPrimary">@color/orange</item>
|
||||||
<item name="colorOnPrimary">@color/green_black_light</item>
|
<item name="colorOnPrimary">@color/green_black_light</item>
|
||||||
<item name="colorOnAccentColor">@color/white</item>
|
<item name="colorOnAccentColor">@color/white</item>
|
||||||
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
|
<item name="colorPrimaryContainer">?android:attr/windowBackground</item>
|
||||||
<item name="colorOutline">?attr/colorPrimary</item>
|
<item name="colorOutline">@color/orange</item>
|
||||||
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
|
<item name="colorSurfaceVariant">?android:attr/windowBackground</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@@ -354,10 +362,12 @@
|
|||||||
<style name="KeepassDXStyle.Light.Dialog.PositiveButtonStyle" parent="Widget.Material3.Button.TextButton.Dialog">
|
<style name="KeepassDXStyle.Light.Dialog.PositiveButtonStyle" parent="Widget.Material3.Button.TextButton.Dialog">
|
||||||
<item name="android:textColor">@color/text_color_light</item>
|
<item name="android:textColor">@color/text_color_light</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="KeepassDXStyle.Light.DateTime.Dialog" parent="Theme.Material3.Light.Dialog">
|
<style name="KeepassDXStyle.Light.DateTime.Dialog" parent="ThemeOverlay.MaterialComponents.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/green_white</item>
|
<item name="android:windowBackground">@color/green_white</item>
|
||||||
|
<item name="buttonBarNegativeButtonStyle">@style/KeepassDXStyle.Light.Dialog.NegativeButtonStyle</item>
|
||||||
|
<item name="buttonBarPositiveButtonStyle">@style/KeepassDXStyle.Light.Dialog.PositiveButtonStyle</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">
|
||||||
@@ -375,10 +385,13 @@
|
|||||||
<style name="KeepassDXStyle.Night.Dialog.PositiveButtonStyle" parent="Widget.Material3.Button.TextButton.Dialog">
|
<style name="KeepassDXStyle.Night.Dialog.PositiveButtonStyle" parent="Widget.Material3.Button.TextButton.Dialog">
|
||||||
<item name="android:textColor">@color/text_color_night</item>
|
<item name="android:textColor">@color/text_color_night</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="KeepassDXStyle.Night.DateTime.Dialog" parent="Theme.Material3.Dark.Dialog">
|
<style name="KeepassDXStyle.Night.DateTime.Dialog" parent="ThemeOverlay.MaterialComponents.Dialog">
|
||||||
<item name="colorAccent">@color/orange_darker</item>
|
<item name="colorAccent">@color/orange_darker</item>
|
||||||
<item name="android:textColorPrimary">@color/green_light</item>
|
<item name="android:textColorPrimary">@color/green_light</item>
|
||||||
<item name="android:windowBackground">@color/grey_dark</item>
|
<item name="android:windowBackground">@color/grey_dark</item>
|
||||||
|
<item name="buttonBarStyle">@style/KeepassDXStyle.Night.Dialog.NegativeButtonStyle</item>
|
||||||
|
<item name="buttonBarNegativeButtonStyle">@style/KeepassDXStyle.Night.Dialog.NegativeButtonStyle</item>
|
||||||
|
<item name="buttonBarPositiveButtonStyle">@style/KeepassDXStyle.Night.Dialog.PositiveButtonStyle</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- CardView -->
|
<!-- CardView -->
|
||||||
@@ -623,6 +636,11 @@
|
|||||||
<item name="android:background">@drawable/background_progress_circle</item>
|
<item name="android:background">@drawable/background_progress_circle</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!-- Snackbar -->
|
||||||
|
<style name="KeepassDXStyle.SnackBar" parent="Widget.Material3.Snackbar.FullWidth">
|
||||||
|
<item name="backgroundTint">@color/red</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<!-- Transparent -->
|
<!-- Transparent -->
|
||||||
<style name="Theme.Transparent" parent="Theme.Material3.DynamicColors.Dark">
|
<style name="Theme.Transparent" parent="Theme.Material3.DynamicColors.Dark">
|
||||||
<item name="android:windowAnimationStyle">@null</item>
|
<item name="android:windowAnimationStyle">@null</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user