Compare commits
3 Commits
1400-keybo
...
2864-bug-c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
58518b294a | ||
![]() |
e5d28f0979 | ||
![]() |
0e581a66c5 |
@@ -331,13 +331,18 @@ namespace keepass2android
|
||||
|
||||
}
|
||||
|
||||
protected override void OnStart()
|
||||
private bool hasRequestedKeyboardActivation = false;
|
||||
protected override void OnStart()
|
||||
{
|
||||
base.OnStart();
|
||||
if (PreferenceManager.GetDefaultSharedPreferences(this)
|
||||
.GetBoolean(GetString(Resource.String.UseKp2aKeyboardInKp2a_key), false))
|
||||
.GetBoolean(GetString(Resource.String.UseKp2aKeyboardInKp2a_key), false)
|
||||
&& (!hasRequestedKeyboardActivation))
|
||||
{
|
||||
CopyToClipboardService.ActivateKeyboard(this);
|
||||
//only try this once. if the user clicks cancel, we don't want to ask again
|
||||
// (it may happen that the activity is restarted because of the NewTask flag immediately after the dialog)
|
||||
hasRequestedKeyboardActivation = true;
|
||||
CopyToClipboardService.ActivateKeyboard(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1570,15 +1570,19 @@ namespace keepass2android
|
||||
|
||||
base.OnPause();
|
||||
}
|
||||
|
||||
private bool hasRequestedKeyboardActivation = false;
|
||||
protected override void OnStart()
|
||||
{
|
||||
base.OnStart();
|
||||
_starting = true;
|
||||
|
||||
if (PreferenceManager.GetDefaultSharedPreferences(this)
|
||||
.GetBoolean(GetString(Resource.String.UseKp2aKeyboardInKp2a_key), false))
|
||||
{
|
||||
CopyToClipboardService.ActivateKeyboard(this);
|
||||
.GetBoolean(GetString(Resource.String.UseKp2aKeyboardInKp2a_key), false)
|
||||
&& !hasRequestedKeyboardActivation)
|
||||
{
|
||||
hasRequestedKeyboardActivation = true;
|
||||
CopyToClipboardService.ActivateKeyboard(this);
|
||||
}
|
||||
|
||||
DonateReminder.ShowDonateReminderIfAppropriate(this);
|
||||
|
@@ -1,4 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
@@ -14,6 +19,7 @@
|
||||
android:text="@string/switch_ime_text" />
|
||||
|
||||
<Button
|
||||
|
||||
android:id="@+id/btn_reopen"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -25,4 +31,51 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cancel" />
|
||||
|
||||
<LinearLayout android:orientation="vertical"
|
||||
android:paddingTop="64dp"
|
||||
android:id="@+id/settings_notes_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:paddingTop="12dp"
|
||||
android:id="@+id/note_kp2a_switch_rooted"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/autoswitch_enabled_but_not_setup"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:paddingTop="12dp"
|
||||
android:id="@+id/note_AutoFillTotp_prefs_ActivateKeyboard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/switch_keyboard_for_totp_enabled"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:paddingTop="12dp"
|
||||
android:id="@+id/note_UseKp2aKeyboardInKp2a"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/switch_keyboard_inside_kp2a_enabled"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/note_OpenKp2aKeyboardAutomatically"
|
||||
android:paddingTop="12dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/switch_keyboard_on_search_enabled"
|
||||
/>
|
||||
|
||||
<Button
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:id="@+id/btn_open_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/IconVisibilityInfo_Android8_btnSettings" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@@ -142,4 +142,146 @@
|
||||
<color name="md_theme_surfaceContainer_highContrast">#1D2118</color>
|
||||
<color name="md_theme_surfaceContainerHigh_highContrast">#282B22</color>
|
||||
<color name="md_theme_surfaceContainerHighest_highContrast">#32362C</color>
|
||||
|
||||
<color name="md_theme_lowstim_primary">#91C456</color>
|
||||
<color name="md_theme_lowstim_onPrimary">#192E00</color>
|
||||
<color name="md_theme_lowstim_primaryContainer">#719E3A</color>
|
||||
<color name="md_theme_lowstim_onPrimaryContainer">#112200</color>
|
||||
<color name="md_theme_lowstim_secondary">#84ACD9</color>
|
||||
<color name="md_theme_lowstim_onSecondary">#002947</color>
|
||||
<color name="md_theme_lowstim_secondaryContainer">#005D94</color>
|
||||
<color name="md_theme_lowstim_onSecondaryContainer">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_tertiary">#40B385</color>
|
||||
<color name="md_theme_lowstim_onTertiary">#002F1E</color>
|
||||
<color name="md_theme_lowstim_tertiaryContainer">#00A676</color>
|
||||
<color name="md_theme_lowstim_onTertiaryContainer">#002216</color>
|
||||
<color name="md_theme_lowstim_error">#D49B94</color>
|
||||
<color name="md_theme_lowstim_onError">#590004</color>
|
||||
<color name="md_theme_lowstim_errorContainer">#7D0008</color>
|
||||
<color name="md_theme_lowstim_onErrorContainer">#D4B9B3</color>
|
||||
<color name="md_theme_lowstim_background">#0F130A</color>
|
||||
<color name="md_theme_lowstim_onBackground">#BEE0C4</color>
|
||||
<color name="md_theme_lowstim_surface">#0F130A</color>
|
||||
<color name="md_theme_lowstim_onSurface">#BEE0C4</color>
|
||||
<color name="md_theme_lowstim_surfaceVariant">#383E30</color>
|
||||
<color name="md_theme_lowstim_onSurfaceVariant">#A6AD99</color>
|
||||
<color name="md_theme_lowstim_outline">#757B68</color>
|
||||
<color name="md_theme_lowstim_outlineVariant">#383E30</color>
|
||||
<color name="md_theme_lowstim_scrim">#000000</color>
|
||||
<color name="md_theme_lowstim_inverseSurface">#BEE0C4</color>
|
||||
<color name="md_theme_lowstim_inverseOnSurface">#272B22</color>
|
||||
<color name="md_theme_lowstim_inversePrimary">#345800</color>
|
||||
<color name="md_theme_lowstim_primaryFixed">#9ED75B</color>
|
||||
<color name="md_theme_lowstim_onPrimaryFixed">#0C1B00</color>
|
||||
<color name="md_theme_lowstim_primaryFixedDim">#82B750</color>
|
||||
<color name="md_theme_lowstim_onPrimaryFixedVariant">#264200</color>
|
||||
<color name="md_theme_lowstim_secondaryFixed">#B2D1E5</color>
|
||||
<color name="md_theme_lowstim_onSecondaryFixed">#00192E</color>
|
||||
<color name="md_theme_lowstim_secondaryFixedDim">#84ACD9</color>
|
||||
<color name="md_theme_lowstim_onSecondaryFixedVariant">#003E66</color>
|
||||
<color name="md_theme_lowstim_tertiaryFixed">#4EC79E</color>
|
||||
<color name="md_theme_lowstim_onTertiaryFixed">#001D11</color>
|
||||
<color name="md_theme_lowstim_tertiaryFixedDim">#2EBDA1</color>
|
||||
<color name="md_theme_lowstim_onTertiaryFixedVariant">#004530</color>
|
||||
<color name="md_theme_lowstim_surfaceDim">#0F130A</color>
|
||||
<color name="md_theme_lowstim_surfaceBright">#2E3229</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerLowest">#0A0D07</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerLow">#161A11</color>
|
||||
<color name="md_theme_lowstim_surfaceContainer">#191D14</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerHigh">#23271E</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerHighest">#2B2F26</color>
|
||||
<color name="md_theme_lowstim_primary_mediumContrast">#91C456</color>
|
||||
<color name="md_theme_lowstim_onPrimary_mediumContrast">#101E00</color>
|
||||
<color name="md_theme_lowstim_primaryContainer_mediumContrast">#719E3A</color>
|
||||
<color name="md_theme_lowstim_onPrimaryContainer_mediumContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_secondary_mediumContrast">#88B3D6</color>
|
||||
<color name="md_theme_lowstim_onSecondary_mediumContrast">#001524</color>
|
||||
<color name="md_theme_lowstim_secondaryContainer_mediumContrast">#3481B7</color>
|
||||
<color name="md_theme_lowstim_onSecondaryContainer_mediumContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_tertiary_mediumContrast">#40B385</color>
|
||||
<color name="md_theme_lowstim_onTertiary_mediumContrast">#002216</color>
|
||||
<color name="md_theme_lowstim_tertiaryContainer_mediumContrast">#00A676</color>
|
||||
<color name="md_theme_lowstim_onTertiaryContainer_mediumContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_error_mediumContrast">#D4A29A</color>
|
||||
<color name="md_theme_lowstim_onError_mediumContrast">#2F0001</color>
|
||||
<color name="md_theme_lowstim_errorContainer_mediumContrast">#D4463B</color>
|
||||
<color name="md_theme_lowstim_onErrorContainer_mediumContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_background_mediumContrast">#0F130A</color>
|
||||
<color name="md_theme_lowstim_onBackground_mediumContrast">#BEE0C4</color>
|
||||
<color name="md_theme_lowstim_surface_mediumContrast">#0F130A</color>
|
||||
<color name="md_theme_lowstim_onSurface_mediumContrast">#D6E6CD</color>
|
||||
<color name="md_theme_lowstim_surfaceVariant_mediumContrast">#383E30</color>
|
||||
<color name="md_theme_lowstim_onSurfaceVariant_mediumContrast">#AAB1A0</color>
|
||||
<color name="md_theme_lowstim_outline_mediumContrast">#888E7B</color>
|
||||
<color name="md_theme_lowstim_outlineVariant_mediumContrast">#6B7163</color>
|
||||
<color name="md_theme_lowstim_scrim_mediumContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_inverseSurface_mediumContrast">#BEE0C4</color>
|
||||
<color name="md_theme_lowstim_inverseOnSurface_mediumContrast">#23261E</color>
|
||||
<color name="md_theme_lowstim_inversePrimary_mediumContrast">#294500</color>
|
||||
<color name="md_theme_lowstim_primaryFixed_mediumContrast">#9ED75B</color>
|
||||
<color name="md_theme_lowstim_onPrimaryFixed_mediumContrast">#071000</color>
|
||||
<color name="md_theme_lowstim_primaryFixedDim_mediumContrast">#82B750</color>
|
||||
<color name="md_theme_lowstim_onPrimaryFixedVariant_mediumContrast">#1D3300</color>
|
||||
<color name="md_theme_lowstim_secondaryFixed_mediumContrast">#B2D1E5</color>
|
||||
<color name="md_theme_lowstim_onSecondaryFixed_mediumContrast">#00101D</color>
|
||||
<color name="md_theme_lowstim_secondaryFixedDim_mediumContrast">#84ACD9</color>
|
||||
<color name="md_theme_lowstim_onSecondaryFixedVariant_mediumContrast">#003151</color>
|
||||
<color name="md_theme_lowstim_tertiaryFixed_mediumContrast">#4EC79E</color>
|
||||
<color name="md_theme_lowstim_onTertiaryFixed_mediumContrast">#001109</color>
|
||||
<color name="md_theme_lowstim_tertiaryFixedDim_mediumContrast">#2EBDA1</color>
|
||||
<color name="md_theme_lowstim_onTertiaryFixedVariant_mediumContrast">#003523</color>
|
||||
<color name="md_theme_lowstim_surfaceDim_mediumContrast">#0F130A</color>
|
||||
<color name="md_theme_lowstim_surfaceBright_mediumContrast">#2E3229</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerLowest_mediumContrast">#0A0D07</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerLow_mediumContrast">#161A11</color>
|
||||
<color name="md_theme_lowstim_surfaceContainer_mediumContrast">#191D14</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerHigh_mediumContrast">#23271E</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerHighest_mediumContrast">#2B2F26</color>
|
||||
<color name="md_theme_lowstim_primary_highContrast">#D6FF99</color>
|
||||
<color name="md_theme_lowstim_onPrimary_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_primaryContainer_highContrast">#8AC757</color>
|
||||
<color name="md_theme_lowstim_onPrimaryContainer_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_secondary_highContrast">#D1D1FF</color>
|
||||
<color name="md_theme_lowstim_onSecondary_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_secondaryContainer_highContrast">#88B3D6</color>
|
||||
<color name="md_theme_lowstim_onSecondaryContainer_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_tertiary_highContrast">#B0FFD1</color>
|
||||
<color name="md_theme_lowstim_onTertiary_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_tertiaryContainer_highContrast">#34B780</color>
|
||||
<color name="md_theme_lowstim_onTertiaryContainer_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_error_highContrast">#eFDADA</color>
|
||||
<color name="md_theme_lowstim_onError_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_errorContainer_highContrast">#D4A29A</color>
|
||||
<color name="md_theme_lowstim_onErrorContainer_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_background_highContrast">#0F130A</color>
|
||||
<color name="md_theme_lowstim_onBackground_highContrast">#BEE0C4</color>
|
||||
<color name="md_theme_lowstim_surface_highContrast">#0F130A</color>
|
||||
<color name="md_theme_lowstim_onSurface_highContrast">#eFeFeF</color>
|
||||
<color name="md_theme_lowstim_surfaceVariant_highContrast">#383E30</color>
|
||||
<color name="md_theme_lowstim_onSurfaceVariant_highContrast">#D4E4C6</color>
|
||||
<color name="md_theme_lowstim_outline_highContrast">#AAB1A0</color>
|
||||
<color name="md_theme_lowstim_outlineVariant_highContrast">#AAB1A0</color>
|
||||
<color name="md_theme_lowstim_scrim_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_inverseSurface_highContrast">#BEE0C4</color>
|
||||
<color name="md_theme_lowstim_inverseOnSurface_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_inversePrimary_highContrast">#152900</color>
|
||||
<color name="md_theme_lowstim_primaryFixed_highContrast">#C2FF80</color>
|
||||
<color name="md_theme_lowstim_onPrimaryFixed_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_primaryFixedDim_highContrast">#8AC757</color>
|
||||
<color name="md_theme_lowstim_onPrimaryFixedVariant_highContrast">#0A1500</color>
|
||||
<color name="md_theme_lowstim_secondaryFixed_highContrast">#DEDEFF</color>
|
||||
<color name="md_theme_lowstim_onSecondaryFixed_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_secondaryFixedDim_highContrast">#88B3D6</color>
|
||||
<color name="md_theme_lowstim_onSecondaryFixedVariant_highContrast">#001524</color>
|
||||
<color name="md_theme_lowstim_tertiaryFixed_highContrast">#95FFB7</color>
|
||||
<color name="md_theme_lowstim_onTertiaryFixed_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_tertiaryFixedDim_highContrast">#34B780</color>
|
||||
<color name="md_theme_lowstim_onTertiaryFixedVariant_highContrast">#00180D</color>
|
||||
<color name="md_theme_lowstim_surfaceDim_highContrast">#0F130A</color>
|
||||
<color name="md_theme_lowstim_surfaceBright_highContrast">#2E3229</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerLowest_highContrast">#0A0D07</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerLow_highContrast">#161A11</color>
|
||||
<color name="md_theme_lowstim_surfaceContainer_highContrast">#191D14</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerHigh_highContrast">#23271E</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerHighest_highContrast">#2B2F26</color>
|
||||
</resources>
|
||||
|
@@ -142,4 +142,146 @@
|
||||
<color name="md_theme_surfaceContainer_highContrast">#E9EFF0</color>
|
||||
<color name="md_theme_surfaceContainerHigh_highContrast">#E3E9EA</color>
|
||||
<color name="md_theme_surfaceContainerHighest_highContrast">#DEE3E5</color>
|
||||
|
||||
<color name="md_theme_lowstim_primary">#3F5625</color>
|
||||
<color name="md_theme_lowstim_onPrimary">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_primaryContainer">#A8C288</color>
|
||||
<color name="md_theme_lowstim_onPrimaryContainer">#0C1B00</color>
|
||||
<color name="md_theme_lowstim_secondary">#295377</color>
|
||||
<color name="md_theme_lowstim_onSecondary">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_secondaryContainer">#B2D1E5</color>
|
||||
<color name="md_theme_lowstim_onSecondaryContainer">#00192E</color>
|
||||
<color name="md_theme_lowstim_tertiary">#325653</color>
|
||||
<color name="md_theme_lowstim_onTertiary">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_tertiaryContainer">#98B2B0</color>
|
||||
<color name="md_theme_lowstim_onTertiaryContainer">#001B1A</color>
|
||||
<color name="md_theme_lowstim_error">#9F1717</color>
|
||||
<color name="md_theme_lowstim_onError">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_errorContainer">#D4B9B3</color>
|
||||
<color name="md_theme_lowstim_onErrorContainer">#370002</color>
|
||||
<color name="md_theme_lowstim_background">#D6D6D6</color>
|
||||
<color name="md_theme_lowstim_onBackground">#171913</color>
|
||||
<color name="md_theme_lowstim_surface">#D2D9DA</color>
|
||||
<color name="md_theme_lowstim_onSurface">#141819</color>
|
||||
<color name="md_theme_lowstim_surfaceVariant">#B9BDB6</color>
|
||||
<color name="md_theme_lowstim_onSurfaceVariant">#3B4034</color>
|
||||
<color name="md_theme_lowstim_outline">#64675B</color>
|
||||
<color name="md_theme_lowstim_outlineVariant">#A8ABA2</color>
|
||||
<color name="md_theme_lowstim_scrim">#000000</color>
|
||||
<color name="md_theme_lowstim_inverseSurface">#252A2B</color>
|
||||
<color name="md_theme_lowstim_inverseOnSurface">#C7CFCF</color>
|
||||
<color name="md_theme_lowstim_inversePrimary">#94B173</color>
|
||||
<color name="md_theme_lowstim_primaryFixed">#A8C288</color>
|
||||
<color name="md_theme_lowstim_onPrimaryFixed">#0C1B00</color>
|
||||
<color name="md_theme_lowstim_primaryFixedDim">#94B173</color>
|
||||
<color name="md_theme_lowstim_onPrimaryFixedVariant">#2E4114</color>
|
||||
<color name="md_theme_lowstim_secondaryFixed">#B2D1E5</color>
|
||||
<color name="md_theme_lowstim_onSecondaryFixed">#00192E</color>
|
||||
<color name="md_theme_lowstim_secondaryFixedDim">#84ACD9</color>
|
||||
<color name="md_theme_lowstim_onSecondaryFixedVariant">#104064</color>
|
||||
<color name="md_theme_lowstim_tertiaryFixed">#98B2B0</color>
|
||||
<color name="md_theme_lowstim_onTertiaryFixed">#001B1A</color>
|
||||
<color name="md_theme_lowstim_tertiaryFixedDim">#88B2AF</color>
|
||||
<color name="md_theme_lowstim_onTertiaryFixedVariant">#1A423F</color>
|
||||
<color name="md_theme_lowstim_surfaceDim">#B6BEC0</color>
|
||||
<color name="md_theme_lowstim_surfaceBright">#D2D9DA</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerLowest">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerLow">#CEDAEC</color>
|
||||
<color name="md_theme_lowstim_surfaceContainer">#CAD0D1</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerHigh">#C9D1D2</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerHighest">#C0C9C7</color>
|
||||
<color name="md_theme_lowstim_primary_mediumContrast">#2A3F0E</color>
|
||||
<color name="md_theme_lowstim_onPrimary_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_primaryContainer_mediumContrast">#526B36</color>
|
||||
<color name="md_theme_lowstim_onPrimaryContainer_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_secondary_mediumContrast">#0A3E5F</color>
|
||||
<color name="md_theme_lowstim_onSecondary_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_secondaryContainer_mediumContrast">#3E698D</color>
|
||||
<color name="md_theme_lowstim_onSecondaryContainer_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_tertiary_mediumContrast">#173F3D</color>
|
||||
<color name="md_theme_lowstim_onTertiary_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_tertiaryContainer_mediumContrast">#426A66</color>
|
||||
<color name="md_theme_lowstim_onTertiaryContainer_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_error_mediumContrast">#750008</color>
|
||||
<color name="md_theme_lowstim_onError_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_errorContainer_mediumContrast">#B92F28</color>
|
||||
<color name="md_theme_lowstim_onErrorContainer_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_background_mediumContrast">#D6D7D0</color>
|
||||
<color name="md_theme_lowstim_onBackground_mediumContrast">#171913</color>
|
||||
<color name="md_theme_lowstim_surface_mediumContrast">#D2D9DA</color>
|
||||
<color name="md_theme_lowstim_onSurface_mediumContrast">#141819</color>
|
||||
<color name="md_theme_lowstim_surfaceVariant_mediumContrast">#B9BDB6</color>
|
||||
<color name="md_theme_lowstim_onSurfaceVariant_mediumContrast">#363B30</color>
|
||||
<color name="md_theme_lowstim_outline_mediumContrast">#4F5347</color>
|
||||
<color name="md_theme_lowstim_outlineVariant_mediumContrast">#696D61</color>
|
||||
<color name="md_theme_lowstim_scrim_mediumContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_inverseSurface_mediumContrast">#252A2B</color>
|
||||
<color name="md_theme_lowstim_inverseOnSurface_mediumContrast">#C7CFCF</color>
|
||||
<color name="md_theme_lowstim_inversePrimary_mediumContrast">#94B173</color>
|
||||
<color name="md_theme_lowstim_primaryFixed_mediumContrast">#526B36</color>
|
||||
<color name="md_theme_lowstim_onPrimaryFixed_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_primaryFixedDim_mediumContrast">#3B531F</color>
|
||||
<color name="md_theme_lowstim_onPrimaryFixedVariant_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_secondaryFixed_mediumContrast">#3E698D</color>
|
||||
<color name="md_theme_lowstim_onSecondaryFixed_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_secondaryFixedDim_mediumContrast">#295377</color>
|
||||
<color name="md_theme_lowstim_onSecondaryFixedVariant_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_tertiaryFixed_mediumContrast">#426A66</color>
|
||||
<color name="md_theme_lowstim_onTertiaryFixed_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_tertiaryFixedDim_mediumContrast">#2E5350</color>
|
||||
<color name="md_theme_lowstim_onTertiaryFixedVariant_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_surfaceDim_mediumContrast">#B6BEC0</color>
|
||||
<color name="md_theme_lowstim_surfaceBright_mediumContrast">#D2D9DA</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerLowest_mediumContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerLow_mediumContrast">#CEDAEC</color>
|
||||
<color name="md_theme_lowstim_surfaceContainer_mediumContrast">#CAD0D1</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerHigh_mediumContrast">#C9D1D2</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerHighest_mediumContrast">#C0C9C7</color>
|
||||
<color name="md_theme_lowstim_primary_highContrast">#051400</color>
|
||||
<color name="md_theme_lowstim_onPrimary_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_primaryContainer_highContrast">#0F2000</color>
|
||||
<color name="md_theme_lowstim_onPrimaryContainer_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_secondary_highContrast">#000F1D</color>
|
||||
<color name="md_theme_lowstim_onSecondary_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_secondaryContainer_highContrast">#0B466F</color>
|
||||
<color name="md_theme_lowstim_onSecondaryContainer_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_tertiary_highContrast">#001312</color>
|
||||
<color name="md_theme_lowstim_onTertiary_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_tertiaryContainer_highContrast">#1A4A47</color>
|
||||
<color name="md_theme_lowstim_onTertiaryContainer_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_error_highContrast">#170001</color>
|
||||
<color name="md_theme_lowstim_onError_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_errorContainer_highContrast">#2A0004</color>
|
||||
<color name="md_theme_lowstim_onErrorContainer_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_background_highContrast">#D6D7D0</color>
|
||||
<color name="md_theme_lowstim_onBackground_highContrast">#171913</color>
|
||||
<color name="md_theme_lowstim_surface_highContrast">#D2D9DA</color>
|
||||
<color name="md_theme_lowstim_onSurface_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_surfaceVariant_highContrast">#B9BDB6</color>
|
||||
<color name="md_theme_lowstim_onSurfaceVariant_highContrast">#1B1E17</color>
|
||||
<color name="md_theme_lowstim_outline_highContrast">#363B30</color>
|
||||
<color name="md_theme_lowstim_outlineVariant_highContrast">#363B30</color>
|
||||
<color name="md_theme_lowstim_scrim_highContrast">#000000</color>
|
||||
<color name="md_theme_lowstim_inverseSurface_highContrast">#252A2B</color>
|
||||
<color name="md_theme_lowstim_inverseOnSurface_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_inversePrimary_highContrast">#B1D18A</color>
|
||||
<color name="md_theme_lowstim_primaryFixed_highContrast">#0F2000</color>
|
||||
<color name="md_theme_lowstim_onPrimaryFixed_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_primaryFixedDim_highContrast">#071700</color>
|
||||
<color name="md_theme_lowstim_onPrimaryFixedVariant_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_secondaryFixed_highContrast">#0B466F</color>
|
||||
<color name="md_theme_lowstim_onSecondaryFixed_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_secondaryFixedDim_highContrast">#002643</color>
|
||||
<color name="md_theme_lowstim_onSecondaryFixedVariant_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_tertiaryFixed_highContrast">#1A4A47</color>
|
||||
<color name="md_theme_lowstim_onTertiaryFixed_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_tertiaryFixedDim_highContrast">#001D1B</color>
|
||||
<color name="md_theme_lowstim_onTertiaryFixedVariant_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_surfaceDim_highContrast">#B6BEC0</color>
|
||||
<color name="md_theme_lowstim_surfaceBright_highContrast">#D2D9DA</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerLowest_highContrast">#DEDEDE</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerLow_highContrast">#CEDAEC</color>
|
||||
<color name="md_theme_lowstim_surfaceContainer_highContrast">#CAD0D1</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerHigh_highContrast">#C9D1D2</color>
|
||||
<color name="md_theme_lowstim_surfaceContainerHighest_highContrast">#C0C9C7</color>
|
||||
</resources>
|
||||
|
@@ -73,6 +73,8 @@
|
||||
<string name="omitbackup_key">omitbackup</string>
|
||||
<string name="list_size_key">list_size</string>
|
||||
<string name="design_key">design_key</string>
|
||||
<string name="LowStimulus_key">LowStimulus_key</string>
|
||||
|
||||
<string name="app_language_pref_key">app_language_pref_key</string>
|
||||
<string name="sort_key_old">sort_key</string>
|
||||
<string name="sort_key">sort_key_new</string>
|
||||
@@ -200,7 +202,7 @@
|
||||
<item>System</item>
|
||||
</string-array>
|
||||
|
||||
<string name="AcceptAllServerCertificates_default">WARN</string>
|
||||
<string name="AcceptAllServerCertificates_default">ERROR</string>
|
||||
<string-array name="AcceptAllServerCertificates_values">
|
||||
<item>IGNORE</item>
|
||||
<item>WARN</item>
|
||||
|
@@ -1249,5 +1249,11 @@
|
||||
<string name="kp2a_switch_on_sendgodone_summary">Switch back when pressing send/go/done</string>
|
||||
<string name="qr_scanning_error_no_google_play_services">QR code scanning requires Google Play Services. Please install or update Google Play Services on your device.</string>
|
||||
<string name="english_ime_settings">Android keyboard settings</string>
|
||||
|
||||
</resources>
|
||||
<string name="autoswitch_enabled_but_not_setup">Note: You have enabled App - Settings - Password access - Keyboard switching - Auto-switch keyboard, but it doesn\'t seem to be configured correctly.</string>
|
||||
<string name="switch_keyboard_for_totp_enabled">Note: You have enabled App - Password access - Autofill-Service - Autofill for TOTP entries. This can cause this window to show when you open an entry with a TOTP.</string>
|
||||
<string name="switch_keyboard_inside_kp2a_enabled">Note: You have enabled App - Security - Use built-in keyboard inside Keepass2Android. This can cause this window to show when you open the app or edit an entry.</string>
|
||||
<string name="switch_keyboard_on_search_enabled">Note: You have enabled App - Security - Password access - Keyboard switching - Switch keyboard. This can cause this window to show when you search for an entry from the browser.</string>
|
||||
<string name="LowStimulus_title">Low stimulus mode</string>
|
||||
<string name="LowStimulus_summary">Enable low stimulus mode</string>
|
||||
|
||||
</resources>
|
@@ -261,6 +261,56 @@
|
||||
</style>
|
||||
|
||||
|
||||
<style name="OverlayLowStimulation" parent="">
|
||||
<item name="colorPrimary">@color/md_theme_lowstim_primary</item>
|
||||
<item name="colorOnPrimary">@color/md_theme_lowstim_onPrimary</item>
|
||||
<item name="colorPrimaryContainer">@color/md_theme_lowstim_primaryContainer</item>
|
||||
<item name="colorOnPrimaryContainer">@color/md_theme_lowstim_onPrimaryContainer</item>
|
||||
<item name="colorSecondary">@color/md_theme_lowstim_secondary</item>
|
||||
<item name="colorOnSecondary">@color/md_theme_lowstim_onSecondary</item>
|
||||
<item name="colorSecondaryContainer">@color/md_theme_lowstim_secondaryContainer</item>
|
||||
<item name="colorOnSecondaryContainer">@color/md_theme_lowstim_onSecondaryContainer</item>
|
||||
<item name="colorTertiary">@color/md_theme_lowstim_tertiary</item>
|
||||
<item name="colorOnTertiary">@color/md_theme_lowstim_onTertiary</item>
|
||||
<item name="colorTertiaryContainer">@color/md_theme_lowstim_tertiaryContainer</item>
|
||||
<item name="colorOnTertiaryContainer">@color/md_theme_lowstim_onTertiaryContainer</item>
|
||||
<item name="colorError">@color/md_theme_lowstim_error</item>
|
||||
<item name="colorOnError">@color/md_theme_lowstim_onError</item>
|
||||
<item name="colorErrorContainer">@color/md_theme_lowstim_errorContainer</item>
|
||||
<item name="colorOnErrorContainer">@color/md_theme_lowstim_onErrorContainer</item>
|
||||
<item name="android:colorBackground">@color/md_theme_lowstim_background</item>
|
||||
<item name="colorOnBackground">@color/md_theme_lowstim_onBackground</item>
|
||||
<item name="colorSurface">@color/md_theme_lowstim_surface</item>
|
||||
<item name="colorOnSurface">@color/md_theme_lowstim_onSurface</item>
|
||||
<item name="colorSurfaceVariant">@color/md_theme_lowstim_surfaceVariant</item>
|
||||
<item name="colorOnSurfaceVariant">@color/md_theme_lowstim_onSurfaceVariant</item>
|
||||
<item name="colorOutline">@color/md_theme_lowstim_outline</item>
|
||||
<item name="colorOutlineVariant">@color/md_theme_lowstim_outlineVariant</item>
|
||||
<item name="colorSurfaceInverse">@color/md_theme_lowstim_inverseSurface</item>
|
||||
<item name="colorOnSurfaceInverse">@color/md_theme_lowstim_inverseOnSurface</item>
|
||||
<item name="colorPrimaryInverse">@color/md_theme_lowstim_inversePrimary</item>
|
||||
<item name="colorPrimaryFixed">@color/md_theme_lowstim_primaryFixed</item>
|
||||
<item name="colorOnPrimaryFixed">@color/md_theme_lowstim_onPrimaryFixed</item>
|
||||
<item name="colorPrimaryFixedDim">@color/md_theme_lowstim_primaryFixedDim</item>
|
||||
<item name="colorOnPrimaryFixedVariant">@color/md_theme_lowstim_onPrimaryFixedVariant</item>
|
||||
<item name="colorSecondaryFixed">@color/md_theme_lowstim_secondaryFixed</item>
|
||||
<item name="colorOnSecondaryFixed">@color/md_theme_lowstim_onSecondaryFixed</item>
|
||||
<item name="colorSecondaryFixedDim">@color/md_theme_lowstim_secondaryFixedDim</item>
|
||||
<item name="colorOnSecondaryFixedVariant">@color/md_theme_lowstim_onSecondaryFixedVariant</item>
|
||||
<item name="colorTertiaryFixed">@color/md_theme_lowstim_tertiaryFixed</item>
|
||||
<item name="colorOnTertiaryFixed">@color/md_theme_lowstim_onTertiaryFixed</item>
|
||||
<item name="colorTertiaryFixedDim">@color/md_theme_lowstim_tertiaryFixedDim</item>
|
||||
<item name="colorOnTertiaryFixedVariant">@color/md_theme_lowstim_onTertiaryFixedVariant</item>
|
||||
<item name="colorSurfaceDim">@color/md_theme_lowstim_surfaceDim</item>
|
||||
<item name="colorSurfaceBright">@color/md_theme_lowstim_surfaceBright</item>
|
||||
<item name="colorSurfaceContainerLowest">@color/md_theme_lowstim_surfaceContainerLowest</item>
|
||||
<item name="colorSurfaceContainerLow">@color/md_theme_lowstim_surfaceContainerLow</item>
|
||||
<item name="colorSurfaceContainer">@color/md_theme_lowstim_surfaceContainer</item>
|
||||
<item name="colorSurfaceContainerHigh">@color/md_theme_lowstim_surfaceContainerHigh</item>
|
||||
<item name="colorSurfaceContainerHighest">@color/md_theme_lowstim_surfaceContainerHighest</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="Widget.Kp2a.Toolbar" parent="Widget.Material3.Toolbar.OnSurface" />
|
||||
|
||||
<style name="Widget.Kp2a.Toolbar.WithCloseButton">
|
||||
|
@@ -60,6 +60,15 @@
|
||||
android:dialogTitle="@string/design_title"
|
||||
android:defaultValue="@string/design_default" />
|
||||
|
||||
|
||||
<CheckBoxPreference
|
||||
android:enabled="true"
|
||||
android:persistent="true"
|
||||
android:summary="@string/LowStimulus_summary"
|
||||
android:defaultValue="false"
|
||||
android:title="@string/LowStimulus_title"
|
||||
android:key="@string/LowStimulus_key" />
|
||||
|
||||
<ListPreference
|
||||
android:key="@string/app_language_pref_key"
|
||||
android:title="@string/app_language_pref_title"
|
||||
|
@@ -6,6 +6,7 @@ using System.Threading;
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
using Android.Preferences;
|
||||
using Android.Runtime;
|
||||
using Android.Util;
|
||||
using Android.Views;
|
||||
@@ -15,8 +16,8 @@ using keepass2android;
|
||||
|
||||
namespace keepass2android
|
||||
{
|
||||
[Activity(Label = AppNames.AppName, TaskAffinity = "", NoHistory = true)]
|
||||
public class SwitchImeActivity : Activity
|
||||
[Activity(Label = AppNames.AppName, Theme = "@style/Kp2aTheme_BlueActionBar")]
|
||||
public class SwitchImeActivity : AndroidX.AppCompat.App.AppCompatActivity
|
||||
{
|
||||
protected override void OnCreate(Bundle savedInstanceState)
|
||||
{
|
||||
@@ -24,7 +25,26 @@ namespace keepass2android
|
||||
SetContentView(Resource.Layout.switch_ime_activity_layout);
|
||||
FindViewById<Button>(Resource.Id.btn_reopen).Click += (sender, args) => TrySwitchKeyboard();
|
||||
FindViewById<Button>(Resource.Id.btn_cancel).Click += (sender, args) => Finish();
|
||||
FindViewById<Button>(Resource.Id.btn_open_settings).Click += (sender, args) => AppSettingsActivity.Launch(this);
|
||||
|
||||
var prefs = PreferenceManager.GetDefaultSharedPreferences(LocaleManager.LocalizedAppContext);
|
||||
|
||||
bool useKp2aKeyboardInKp2a = prefs.GetBoolean(GetString(Resource.String.UseKp2aKeyboardInKp2a_key), false);
|
||||
bool kp2a_switch_rooted = prefs.GetBoolean("kp2a_switch_rooted", false);
|
||||
bool AutoFillTotp_prefs_ActivateKeyboard = prefs.GetBoolean("AutoFillTotp_prefs_ActivateKeyboard_key", false);
|
||||
bool OpenKp2aKeyboardAutomatically = prefs.GetBoolean(GetString(Resource.String.OpenKp2aKeyboardAutomatically_key), Resources.GetBoolean(Resource.Boolean.OpenKp2aKeyboardAutomatically_default));
|
||||
|
||||
FindViewById(Resource.Id.note_UseKp2aKeyboardInKp2a).Visibility = useKp2aKeyboardInKp2a ? ViewStates.Visible : ViewStates.Gone;
|
||||
FindViewById(Resource.Id.note_kp2a_switch_rooted).Visibility = kp2a_switch_rooted ? ViewStates.Visible : ViewStates.Gone;
|
||||
FindViewById(Resource.Id.note_AutoFillTotp_prefs_ActivateKeyboard).Visibility = AutoFillTotp_prefs_ActivateKeyboard ? ViewStates.Visible : ViewStates.Gone;
|
||||
FindViewById(Resource.Id.note_OpenKp2aKeyboardAutomatically).Visibility = OpenKp2aKeyboardAutomatically ? ViewStates.Visible : ViewStates.Gone;
|
||||
|
||||
bool hasNote = useKp2aKeyboardInKp2a || kp2a_switch_rooted || AutoFillTotp_prefs_ActivateKeyboard || OpenKp2aKeyboardAutomatically;
|
||||
((LinearLayout)FindViewById(Resource.Id.settings_notes_container)).Visibility = hasNote ? ViewStates.Visible : ViewStates.Gone;
|
||||
|
||||
}
|
||||
|
||||
|
||||
private string Kp2aInputMethodName
|
||||
{
|
||||
get { return PackageName + "/keepass2android.softkeyboard.KP2AKeyboard"; }
|
||||
|
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Content.Res;
|
||||
using Android.OS;
|
||||
using Android.Preferences;
|
||||
@@ -49,6 +50,11 @@ namespace keepass2android
|
||||
{
|
||||
_currentThemeId = NightModePreference;
|
||||
AppCompatDelegate.DefaultNightMode = _currentThemeId.Value;
|
||||
if (PreferenceManager.GetDefaultSharedPreferences(_activity).GetBoolean(_activity.GetString(Resource.String.LowStimulus_key), false))
|
||||
{
|
||||
_activity.SetTheme(Resource.Style.OverlayLowStimulation);
|
||||
}
|
||||
|
||||
_secureWindow = SecureWindowPref();
|
||||
|
||||
_currentIconSet = PreferenceManager.GetDefaultSharedPreferences(_activity)
|
||||
|
@@ -918,14 +918,16 @@ namespace keepass2android
|
||||
{
|
||||
var prefs = PreferenceManager.GetDefaultSharedPreferences(LocaleManager.LocalizedAppContext);
|
||||
|
||||
ValidationMode validationMode = ValidationMode.Warn;
|
||||
ValidationMode validationMode = ValidationMode.Error;
|
||||
|
||||
string strValMode = prefs.GetString(LocaleManager.LocalizedAppContext.Resources.GetString(Resource.String.AcceptAllServerCertificates_key),
|
||||
LocaleManager.LocalizedAppContext.Resources.GetString(Resource.String.AcceptAllServerCertificates_default));
|
||||
|
||||
if (strValMode == "IGNORE")
|
||||
validationMode = ValidationMode.Ignore;
|
||||
else if (strValMode == "ERROR")
|
||||
else if (strValMode == "WARN")
|
||||
validationMode = ValidationMode.Warn;
|
||||
else if (strValMode == "ERROR")
|
||||
validationMode = ValidationMode.Error;
|
||||
return validationMode;
|
||||
}
|
||||
|
@@ -57,6 +57,12 @@ private static Drawable _blank;
|
||||
if (draw != null)
|
||||
{
|
||||
draw = draw.Mutate();
|
||||
if (PreferenceManager.GetDefaultSharedPreferences(context).GetBoolean(context.GetString(Resource.String.LowStimulus_key), false))
|
||||
{
|
||||
Android.Graphics.PorterDuff.Mode mMode = Android.Graphics.PorterDuff.Mode.Multiply;
|
||||
Color color = new Color(220, 220, 220);
|
||||
draw.SetColorFilter(color, mMode);
|
||||
}
|
||||
iv.SetImageDrawable(draw);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user