first steps towards Material3 design

* updates themes and color definitions
 * removed many color attributes from views and special configurations
 * reworked settings completely to get rid of "settings toolsbar"
 * use DayNight theme instead of custom light/dark
Note that there are quite a few issues left.
This commit is contained in:
Philipp Crocoll
2024-12-07 07:53:34 +01:00
parent b101bf8d5f
commit 95d7ecd066
82 changed files with 2348 additions and 1084 deletions

View File

@@ -108,8 +108,12 @@ namespace keepass2android
public static void SendLog(Context ctx)
{
if (!File.Exists(LogFilename))
return;
if (!File.Exists(LogFilename))
{
Toast.MakeText(ctx, "Debug log is empty.", ToastLength.Long).Show();
return;
}
Intent sendIntent = new Intent();
sendIntent.SetAction(Intent.ActionSend);
sendIntent.PutExtra(Intent.ExtraText, File.ReadAllText(LogFilename));

View File

@@ -10,7 +10,7 @@ namespace keepass2android
{
[Activity(Label = "@string/app_name",
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden,
Theme = "@style/MyTheme_ActionBar",
Theme = "@style/Kp2aTheme_ActionBar",
Exported = true)]
[IntentFilter(new[] { "kp2a.action.AboutActivity" }, Categories = new[] { Intent.CategoryDefault })]
public class AboutActivity: Activity, IDialogInterfaceOnDismissListener

View File

@@ -14,7 +14,7 @@ using keepass2android_appSdkStyle;
namespace keepass2android
{
[Activity(Label = AppNames.AppName, Theme = "@style/MyTheme_ActionBar", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden)]
[Activity(Label = AppNames.AppName, Theme = "@style/Kp2aTheme_ActionBar", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden)]
public class CloseImmediatelyActivity : AndroidX.AppCompat.App.AppCompatActivity
{
protected override void OnResume()

View File

@@ -28,7 +28,7 @@ using Object = Java.Lang.Object;
namespace keepass2android
{
[Activity(Label = "@string/child_dbs_title", MainLauncher = false, Theme = "@style/MyTheme_Blue", LaunchMode = LaunchMode.SingleInstance, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden, Exported = true)]
[Activity(Label = "@string/child_dbs_title", MainLauncher = false, Theme = "@style/Kp2aTheme_BlueNoActionBar", LaunchMode = LaunchMode.SingleInstance, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden, Exported = true)]
[IntentFilter(new[] { "kp2a.action.ConfigureChildDatabasesActivity" }, Categories = new[] { Intent.CategoryDefault })]
public class ConfigureChildDatabasesActivity : LockCloseActivity
{

View File

@@ -20,7 +20,7 @@ namespace keepass2android
{
[Activity(Label = "@string/app_name",
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden,
Theme = "@style/MyTheme_ActionBar")]
Theme = "@style/Kp2aTheme_ActionBar")]
public class CreateDatabaseActivity : LifecycleAwareActivity
{
private IOConnectionInfo _ioc;

View File

@@ -15,7 +15,7 @@ using KeePassLib.Utility;
namespace keepass2android
{
[Activity(Label = AppNames.AppName, Theme = "@style/MyTheme_ActionBar")]
[Activity(Label = AppNames.AppName, Theme = "@style/Kp2aTheme_ActionBar")]
public class DonateReminder : Activity
{
class Reminder

View File

@@ -94,7 +94,7 @@ namespace keepass2android
[Activity (Label = "@string/app_name", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden,
Theme = "@style/MyTheme_ActionBar")]
Theme = "@style/Kp2aTheme_ActionBar")]
public class EntryActivity : LockCloseActivity
{
public const String KeyEntry = "entry";

View File

@@ -54,7 +54,7 @@ using Resource = keepass2android_appSdkStyle.Resource;
namespace keepass2android
{
[Activity(Label = "@string/app_name", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden, Theme = "@style/MyTheme_ActionBar")]
[Activity(Label = "@string/app_name", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden, Theme = "@style/Kp2aTheme_ActionBar")]
public class EntryEditActivity : LockCloseActivity {

View File

@@ -42,7 +42,7 @@ namespace keepass2android
[Activity(Label = "@string/app_name",
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden,
Theme = "@style/MyTheme_ActionBar", Exported = true)]
Theme = "@style/Kp2aTheme_ActionBar", Exported = true)]
[IntentFilter(new[] {"kp2a.action.ExportDatabaseActivity"}, Categories = new[] {Intent.CategoryDefault})]
public class ExportDatabaseActivity : LockCloseActivity
{

View File

@@ -21,7 +21,7 @@ using Resource = keepass2android_appSdkStyle.Resource;
namespace keepass2android
{
[Activity(Label = "@string/app_name", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden, Theme = "@style/MyTheme_Blue")]
[Activity(Label = "@string/app_name", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden, Theme = "@style/Kp2aTheme_BlueNoActionBar")]
public class FileStorageSelectionActivity : AndroidX.AppCompat.App.AppCompatActivity
{
private readonly ActivityDesign _design;

View File

@@ -23,7 +23,7 @@ namespace keepass2android
{
[Activity(Label = "@string/app_name",
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden,
Theme = "@style/MyTheme_ActionBar", MainLauncher = false, Exported = true)]
Theme = "@style/Kp2aTheme_ActionBar", MainLauncher = false, Exported = true)]
[IntentFilter(new[] { "kp2a.action.FingerprintSetupActivity" }, Categories = new[] { Intent.CategoryDefault })]
public class BiometricSetupActivity : LockCloseActivity, IBiometricAuthCallback
{
@@ -269,7 +269,7 @@ namespace keepass2android
_fpTextView.RemoveCallbacks(ResetErrorTextRunnable);
_fpIcon.SetImageResource(Resource.Drawable.ic_fingerprint_success);
_fpTextView.SetTextColor(_fpTextView.Resources.GetColor(Resource.Color.success_color, null));
_fpTextView.SetTextColor(_fpTextView.Resources.GetColor(Resource.Color.md_theme_secondary, null));
_fpTextView.Text = _fpTextView.Resources.GetString(Resource.String.fingerprint_success);
_fpIcon.PostDelayed(() =>
{
@@ -292,7 +292,7 @@ namespace keepass2android
_fpIcon.SetImageResource(Resource.Drawable.ic_fingerprint_error);
_fpTextView.Text = error;
_fpTextView.SetTextColor(
_fpTextView.Resources.GetColor(Resource.Color.warning_color, null));
_fpTextView.Resources.GetColor(Resource.Color.md_theme_error, null));
_fpTextView.RemoveCallbacks(ResetErrorTextRunnable);
_fpTextView.PostDelayed(ResetErrorTextRunnable, ERROR_TIMEOUT_MILLIS);
}
@@ -305,7 +305,7 @@ namespace keepass2android
void ResetErrorTextRunnable()
{
_fpTextView.SetTextColor(
_fpTextView.Resources.GetColor(Resource.Color.hint_color, null));
_fpTextView.Resources.GetColor(Resource.Color.md_theme_secondary, null));
_fpTextView.Text = "";
_fpIcon.SetImageResource(Resource.Drawable.ic_fp_40px);
}

View File

@@ -36,7 +36,7 @@ using OtpKeyProv;
namespace keepass2android
{
[Activity(Label = "@string/app_name", Theme = "@style/MyTheme_ActionBar", WindowSoftInputMode = SoftInput.StateHidden, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden)]
[Activity(Label = "@string/app_name", Theme = "@style/Kp2aTheme_ActionBar", WindowSoftInputMode = SoftInput.StateHidden, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden)]
public class GeneratePasswordActivity :
#if DEBUG
LifecycleAwareActivity

View File

@@ -41,7 +41,7 @@ using Object = Java.Lang.Object;
namespace keepass2android
{
[Activity(Label = "@string/app_name", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden, Theme = "@style/MyTheme_ActionBar", Exported = true)]
[Activity(Label = "@string/app_name", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden, Theme = "@style/Kp2aTheme_ActionBar", Exported = true)]
[MetaData("android.app.default_searchable", Value = "keepass2android.search.SearchResults")]
#if NoNet
[MetaData("android.app.searchable", Resource = "@xml/searchable_offline")]

View File

@@ -299,7 +299,7 @@ namespace keepass2android
{
RunOnUiThread(() =>
{
var listView = FragmentManager.FindFragmentById<GroupListFragment>(Resource.Id.list_fragment)
var listView = FragmentManager?.FindFragmentById<GroupListFragment>(Resource.Id.list_fragment)
.ListView;
if (listView != null)
{
@@ -1351,6 +1351,7 @@ namespace keepass2android
FindViewById(Resource.Id.fabAddNewEntry).Visibility = ViewStates.Gone;
FindViewById(Resource.Id.fabAddNew).Visibility = ViewStates.Gone;
FindViewById(Resource.Id.fabSearch).Visibility = ViewStates.Gone;
FindViewById(Resource.Id.fabTotpOverview).Visibility = ViewStates.Gone;
UpdateBottomBarElementVisibility(Resource.Id.insert_element, true);
UpdateBottomBarElementVisibility(Resource.Id.cancel_insert_element, true);
@@ -1500,7 +1501,7 @@ namespace keepass2android
if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
{
_statusBarColor = Activity.Window.StatusBarColor;
Activity.Window.SetStatusBarColor(Activity.Resources.GetColor(Resource.Color.appAccentColorDark));
Activity.Window.SetStatusBarColor(Activity.Resources.GetColor(Resource.Color.md_theme_secondary));
}
return true;
}

View File

@@ -27,7 +27,7 @@ using KeePassLib.Utility;
namespace keepass2android
{
[Activity(Label = "@string/app_name", Theme = "@style/Dialog")]
[Activity(Label = "@string/app_name")]
public class GroupEditActivity : LifecycleAwareActivity
{
public const String KeyParent = "parent";

View File

@@ -35,7 +35,7 @@ using IOException = Java.IO.IOException;
namespace keepass2android
{
[Activity(Label = "@string/app_name", Theme = "@style/MyTheme_ActionBar", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden)]
[Activity(Label = "@string/app_name", Theme = "@style/Kp2aTheme_ActionBar", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden)]
public class IconPickerActivity : LockCloseActivity
{
public const string KeyIconId = "icon_id";

View File

@@ -295,7 +295,7 @@ namespace keepass2android
}
}
[Activity(Label = "@string/app_name", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden,
Theme = "@style/MyTheme_ActionBar")]
Theme = "@style/Kp2aTheme_ActionBar")]
public class ImageViewActivity : LockCloseActivity
{
private ActivityDesign _activityDesign;

View File

@@ -69,7 +69,7 @@ namespace keepass2android
/// <summary>
/// Launcher activity of Keepass2Android. This activity usually forwards to SelectCurrentDb but may show the revision dialog after installation or updates.
/// </summary>
[Activity(Label = AppNames.AppName, MainLauncher = false, Theme = "@style/MyTheme_Blue", Exported = true)]
[Activity(Label = AppNames.AppName, MainLauncher = false, Theme = "@style/Kp2aTheme_BlueActionBar", Exported = true)]
[IntentFilter(new[] { Intent.ActionMain }, Categories = new[] { "android.intent.category.LAUNCHER", "android.intent.category.MULTIWINDOW_LAUNCHER" })]
public class KeePass : LifecycleAwareActivity, IDialogInterfaceOnDismissListener
{

View File

@@ -108,7 +108,7 @@
</intent-filter>
</activity>
<activity android:configChanges="orientation|keyboard|keyboardHidden" android:label="@string/app_name" android:theme="@style/MyTheme_Blue" android:name="keepass2android.SelectCurrentDbActivity" android:windowSoftInputMode="adjustResize" android:exported="true">
<activity android:configChanges="orientation|keyboard|keyboardHidden" android:label="@string/app_name" android:theme="@style/Kp2aTheme_BlueNoActionBar" android:name="keepass2android.SelectCurrentDbActivity" android:windowSoftInputMode="adjustResize" android:exported="true">
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />

View File

@@ -112,7 +112,7 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:configChanges="orientation|keyboard|keyboardHidden" android:label="@string/app_name" android:theme="@style/MyTheme_Blue" android:name="keepass2android.SelectCurrentDbActivity" android:windowSoftInputMode="adjustResize" android:exported="true">
<activity android:configChanges="orientation|keyboard|keyboardHidden" android:label="@string/app_name" android:theme="@style/Kp2aTheme_BlueNoActionBar" android:name="keepass2android.SelectCurrentDbActivity" android:windowSoftInputMode="adjustResize" android:exported="true">
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />

View File

@@ -82,7 +82,7 @@
</intent-filter>
</activity>
<activity android:configChanges="orientation|keyboard|keyboardHidden" android:label="@string/app_name" android:theme="@style/MyTheme_Blue" android:name="keepass2android.SelectCurrentDbActivity" android:windowSoftInputMode="adjustResize"
<activity android:configChanges="orientation|keyboard|keyboardHidden" android:label="@string/app_name" android:theme="@style/Kp2aTheme_BlueNoActionBar" android:name="keepass2android.SelectCurrentDbActivity" android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW" />

View File

@@ -15,7 +15,7 @@ using keepass2android_appSdkStyle;
namespace keepass2android
{
[Activity(Label = AppNames.AppName, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden, Theme = "@style/MyTheme_Blue",
[Activity(Label = AppNames.AppName, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden, Theme = "@style/Kp2aTheme_BlueActionBar",
LaunchMode = LaunchMode.SingleInstance)]
public class NoSecureDisplayActivity : AndroidX.AppCompat.App.AppCompatActivity
{

View File

@@ -63,6 +63,7 @@ using ClipboardManager = Android.Content.ClipboardManager;
using Enum = System.Enum;
using Exception = System.Exception;
using String = System.String;
using Toolbar = AndroidX.AppCompat.Widget.Toolbar;
namespace keepass2android
{
@@ -70,7 +71,7 @@ namespace keepass2android
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden,
LaunchMode = LaunchMode.SingleInstance,
WindowSoftInputMode = SoftInput.AdjustResize,
Theme = "@style/MyTheme_Blue")]
Theme = "@style/Kp2aTheme_BlueNoActionBar")]
public class PasswordActivity : LockingActivity, IBiometricAuthCallback
{
@@ -1048,9 +1049,7 @@ namespace keepass2android
private void InitializeToolbar()
{
var toolbar = FindViewById<AndroidX.AppCompat.Widget.Toolbar>(Resource.Id.mytoolbar);
SetSupportActionBar(toolbar);
var collapsingToolbar = FindViewById<CollapsingToolbarLayout>(Resource.Id.collapsing_toolbar);
collapsingToolbar.SetTitle(GetString(Resource.String.unlock_database_title));
@@ -1063,7 +1062,7 @@ namespace keepass2android
_drawerLayout?.SetDrawerListener(mDrawerToggle);
SetSupportActionBar(FindViewById<Toolbar>(Resource.Id.toolbar));
SupportActionBar.SetDisplayHomeAsUpEnabled(true);
SupportActionBar.SetHomeButtonEnabled(true);
mDrawerToggle.SyncState();
@@ -2008,7 +2007,7 @@ namespace keepass2android
{
Kp2aLog.LogUnexpectedError(e);
}
SetEditText(Resource.Id.filename, filenameToShow);
//SetEditText(Resource.Id.filename, filenameToShow);
}

View File

@@ -18,7 +18,7 @@ namespace keepass2android
[Activity(Label = "@string/app_name",
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden,
Exported = true,
Theme = "@style/MyTheme_ActionBar")]
Theme = "@style/Kp2aTheme_ActionBar")]
[IntentFilter(new[] { Strings.ActionQueryCredentials},
Categories = new[] { Intent.CategoryDefault })]
[IntentFilter(new[] { Strings.ActionQueryCredentialsForOwnPackage },

View File

@@ -32,6 +32,7 @@ using Google.Android.Material.AppBar;
using keepass2android_appSdkStyle;
using KeePassLib;
using KeePassLib.Serialization;
using Toolbar = AndroidX.AppCompat.Widget.Toolbar;
namespace keepass2android
{
@@ -39,7 +40,7 @@ namespace keepass2android
ConfigurationChanges = ConfigChanges.Orientation,
WindowSoftInputMode = SoftInput.AdjustResize,
MainLauncher = false,
Theme = "@style/MyTheme_Blue")]
Theme = "@style/Kp2aTheme_BlueNoActionBar")]
public class QuickUnlock : LifecycleAwareActivity, IBiometricAuthCallback
{
private IOConnectionInfo _ioc;
@@ -76,14 +77,12 @@ namespace keepass2android
SetContentView(Resource.Layout.QuickUnlock);
var toolbar = FindViewById<AndroidX.AppCompat.Widget.Toolbar>(Resource.Id.mytoolbar);
SetSupportActionBar(toolbar);
var collapsingToolbar = FindViewById<CollapsingToolbarLayout>(Resource.Id.collapsing_toolbar);
collapsingToolbar.SetTitle(GetString(Resource.String.QuickUnlock_prefs));
if (App.Kp2a.GetDbForQuickUnlock().KpDatabase.Name != "")
SetSupportActionBar(FindViewById<Toolbar>(Resource.Id.toolbar));
if (App.Kp2a.GetDbForQuickUnlock().KpDatabase.Name != "")
{
FindViewById(Resource.Id.filename_label).Visibility = ViewStates.Visible;
((TextView) FindViewById(Resource.Id.filename_label)).Text = App.Kp2a.GetDbForQuickUnlock().KpDatabase.Name;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -4,5 +4,5 @@
android:shape="rectangle">
<size android:height="2px" />
<solid
android:color="@color/emphasis2"/>
android:color="@color/md_theme_secondary"/>
</shape>

View File

@@ -4,5 +4,5 @@
android:shape="rectangle">
<size android:width="1000dp" android:height="2px" />
<solid
android:color="@color/light_gray"/>
android:color="@color/md_theme_surface"/>
</shape>

View File

@@ -1,87 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:background="@drawable/splash_bg_selector"
android:layout_height="fill_parent"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:gravity="center_horizontal"
android:fitsSystemWindows="true">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:gravity="center_vertical"
>
<ImageView
android:id="@+id/splashlogo"
android:layout_width="wrap_content"
android:layout_height="100dp"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/splashlogo" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Keepass2Android"
android:textSize="36dp"
android:fontFamily="sans-serif-light"
android:textColor="#fff" />
</LinearLayout>
<View
android:id="@+id/dividerTop"
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="280dp"
>
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
android:fitsSystemWindows="true"
app:expandedTitleMarginStart="16dp"
app:expandedTitleMarginEnd="24dp"
app:expandedTitleMarginBottom="20sp">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_weight="0"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="#d1e7f6" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
>
android:layout_height="fill_parent"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:gravity="center_horizontal"
android:fitsSystemWindows="true">
<ImageView
android:id="@+id/splashlogo"
android:layout_width="@dimen/splash_logo_width"
android:layout_height="@dimen/splash_logo_height"
android:layout_weight="0"
android:scaleType="centerCrop"
android:layout_marginTop="@dimen/splash_logo_marginTop"
android:src="@drawable/splashlogo" />
<Button
android:id="@+id/start_open_file"
android:text="@string/start_open_file"
android:layout_weight="0.5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/opendb"
android:layout_marginRight="16dp"
style="@style/SplashScreenButton" />
<Button
android:id="@+id/start_create"
android:text="@string/start_create"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_weight="0.5"
android:drawableLeft="@drawable/createnewdb"
style="@style/SplashScreenButton" />
</LinearLayout>
<View
android:id="@+id/dividerTop"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_weight="0"
android:layout_marginTop="8dp"
android:layout_marginBottom="0dp"
android:background="#d1e7f6" />
<fragment
android:name="keepass2android.RecentFilesFragment"
android:id="@+id/recent_files"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text="Keepass2Android"
android:inputType="text"
android:textSize="@dimen/splash_fontsize"
android:fontFamily="sans-serif-light"
android:layout_marginBottom="8dp"
/>
<View
android:id="@+id/dividerTop"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_weight="0"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="@color/md_theme_secondary" />
</LinearLayout>
</LinearLayout>
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="16dp">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
>
<Button
android:id="@+id/start_open_file"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:text="@string/start_open_file"
android:layout_weight="0.5"
android:drawableLeft="@drawable/opendb" />
<Button
android:id="@+id/start_create"
android:text="@string/start_create"
android:layout_weight="0.5"
android:drawableLeft="@drawable/createnewdb"
android:layout_margin="4dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<fragment
android:name="keepass2android.RecentFilesFragment"
android:id="@+id/recent_files"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -13,7 +13,8 @@ android:fitsSystemWindows="true">
<LinearLayout
android:id="@+id/top"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_height="0dp"
android:background="@android:color/transparent"
android:orientation="horizontal" />
<RelativeLayout
android:id="@+id/bottom_bar"
@@ -58,15 +59,13 @@ android:fitsSystemWindows="true">
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="@dimen/detail_backdrop_height"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:fitsSystemWindows="true">
>
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
android:fitsSystemWindows="true"
app:contentScrim="?attr/colorAccent"
app:expandedTitleMarginStart="16dp"
app:expandedTitleMarginEnd="24dp"
app:expandedTitleMarginBottom="20sp">
@@ -79,7 +78,6 @@ android:fitsSystemWindows="true">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:fitsSystemWindows="true"
android:src="@drawable/toolbar_bg_quickunlock"
app:layout_collapseMode="parallax" />
<TextView
@@ -91,13 +89,16 @@ android:fitsSystemWindows="true">
android:layout_marginLeft="16dp"
android:textSize="10sp"
android:text="/storage/emulated/0/keepass/keepass/database.kdbx" />
</RelativeLayout>
<androidx.appcompat.widget.Toolbar
android:id="@+id/mytoolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_collapseMode="pin" />
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"/>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>

View File

@@ -100,11 +100,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/TextAppearance_Help_Dense"
android:textColor="@color/light_gray"
app:help_text="@string/EnableCopyForThisDevice_Info"
app:title_text="@string/child_db_enable_a_copy_for_this_device"
android:text="@string/EnableCopyForThisDevice_Info"
android:background="?android:attr/selectableItemBackground"/>
/>
</LinearLayout>
</LinearLayout>

View File

@@ -6,17 +6,7 @@
android:fitsSystemWindows="true"
android:layout_height="fill_parent"
android:gravity="center_horizontal">
<androidx.appcompat.widget.Toolbar
android:id="@+id/mytoolbar"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
android:background="?attr/colorPrimary"
app:titleTextStyle="@style/MyTitleTextStyle"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:minHeight="?attr/actionBarSize"
/>
<TextView android:id="@+id/myinfotext" android:text="@string/child_db_explanation"
<TextView android:id="@+id/myinfotext" android:text="@string/child_db_explanation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file is based on Keepassdroid, Copyright Brian Pellin.
Keepass2Android is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Keepass2Android is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Keepass2Android. If not, see <http://www.gnu.org/licenses/>.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<EditText android:id="@+id/rounds"
android:hint="@string/rounds_hint"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:inputType="number"/>
<TextView android:id="@+id/rounds_explaination"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_below="@id/rounds"/>
</RelativeLayout>

View File

@@ -17,28 +17,34 @@
You should have received a copy of the GNU General Public License
along with Keepass2Android. If not, see <http://www.gnu.org/licenses/>.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/groupname_container"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/group_name_vdots"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:src="@drawable/vdots_bright"
android:gravity="right|bottom"
android:layout_alignParentRight="true"
android:paddingTop="4sp"/>
<TextView android:id="@+id/file_filename"
android:layout_width="fill_parent"
<Button android:id="@+id/file_filename"
style="@style/Widget.Material3.Button.TextButton"
android:layout_weight="1"
android:gravity="left|center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#cccccc"
android:paddingTop="4sp"
android:paddingBottom="4sp"
android:layout_toLeftOf="@id/group_name_vdots"
android:textColor="@color/md_theme_secondary"
android:paddingTop="8sp"
android:paddingBottom="8sp"
/>
</RelativeLayout>
<Button style="@style/Widget.Material3.Button.TextButton.Icon"
android:id="@+id/group_name_vdots"
android:layout_width="50dp"
android:gravity="center"
android:layout_height="wrap_content"
android:layout_weight="0"
app:icon="@drawable/vdots_bright"
android:layout_marginRight="4dp"
android:paddingTop="4dp"/>
</LinearLayout>

View File

@@ -1,58 +1,114 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:background="@drawable/splash_bg_selector"
android:layout_height="fill_parent"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:gravity="center_horizontal"
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<ImageView
android:id="@+id/splashlogo"
android:layout_width="@dimen/splash_logo_width"
android:layout_height="@dimen/splash_logo_height"
android:layout_weight="0"
android:layout_marginTop="@dimen/splash_logo_marginTop"
android:src="@drawable/splashlogo" />
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="280dp"
>
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
android:fitsSystemWindows="true"
app:expandedTitleMarginStart="16dp"
app:expandedTitleMarginEnd="24dp"
app:expandedTitleMarginBottom="20sp">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:gravity="center_horizontal"
android:fitsSystemWindows="true">
<ImageView
android:id="@+id/splashlogo"
android:layout_width="@dimen/splash_logo_width"
android:layout_height="@dimen/splash_logo_height"
android:layout_weight="0"
android:scaleType="centerCrop"
android:layout_marginTop="@dimen/splash_logo_marginTop"
android:src="@drawable/splashlogo" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text="Keepass2Android"
android:inputType="text"
android:textSize="@dimen/splash_fontsize"
android:fontFamily="sans-serif-light"
android:layout_marginBottom="8dp"
android:textColor="#fff" />
<View
android:id="@+id/dividerTop"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_weight="0"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="#d1e7f6" />
<Button
android:id="@+id/start_open_file"
android:text="@string/start_open_file"
android:layout_weight="0"
android:drawableLeft="@drawable/opendb"
style="@style/SplashScreenButton" />
<Button
android:id="@+id/start_create"
android:text="@string/start_create"
android:layout_weight="0"
android:drawableLeft="@drawable/createnewdb"
style="@style/SplashScreenButton" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text="Keepass2Android"
android:inputType="text"
android:textSize="@dimen/splash_fontsize"
android:fontFamily="sans-serif-light"
android:layout_marginBottom="8dp"
/>
<View
android:id="@+id/dividerTop"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_weight="0"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="@color/md_theme_secondary" />
<fragment
android:name="keepass2android.RecentFilesFragment"
android:id="@+id/recent_files"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
</LinearLayout>
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"/>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="16dp">
<Button
android:id="@+id/start_open_file"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/start_open_file"
android:layout_weight="0"
android:drawableLeft="@drawable/opendb" />
<Button
android:id="@+id/start_create"
android:text="@string/start_create"
android:layout_weight="0"
android:drawableLeft="@drawable/createnewdb"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<fragment
android:name="keepass2android.RecentFilesFragment"
android:id="@+id/recent_files"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -8,15 +8,12 @@
android:layout_height="fill_parent"
android:gravity="center_horizontal">
<androidx.appcompat.widget.Toolbar
android:id="@+id/mytoolbar"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:titleTextStyle="@style/MyTitleTextStyle"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:minHeight="?attr/actionBarSize"
android:background="#00000000" />
<GridView
android:id="@+id/mytoolbar"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
app:theme="@style/ThemeOverlay.Material3.Dark.ActionBar"
android:minHeight="?attr/actionBarSize" />
<GridView
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

View File

@@ -43,10 +43,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/TextAppearance_Help_Dense"
android:textColor="@color/light_gray"
app:help_text="@string/enable_fingerprint_quickunlock_Info"
app:title_text="@string/enable_fingerprint_quickunlock"
android:background="?android:attr/selectableItemBackground" />
/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
@@ -62,10 +61,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/TextAppearance_Help_Dense"
android:textColor="@color/light_gray"
app:help_text="@string/enable_fingerprint_unlock_Info"
app:title_text="@string/enable_fingerprint_unlock"
android:background="?android:attr/selectableItemBackground" />
/>
</LinearLayout>
<CheckBox
android:id="@+id/close_database_after_failed"
@@ -116,7 +115,7 @@
android:layout_toEndOf="@+id/fingerprint_icon"
android:gravity="center_vertical"
android:text=""
android:textColor="@color/hint_color" />
android:textColor="@color/md_theme_primary" />
<Button
android:id="@+id/cancel_button"
android:text="@string/cancel"

View File

@@ -24,7 +24,7 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal"
android:background="@color/icon_background"
android:background="@color/md_theme_secondaryContainer"
android:minWidth="60dp"
android:minHeight="60dp"
android:padding="5dp">
@@ -40,7 +40,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textColor="@color/icon_text"
android:textColor="@color/md_theme_onSecondaryContainer"
android:text="00">
</TextView>
</LinearLayout>

View File

@@ -22,7 +22,7 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:verticalSpacing="5dp"
android:background="@color/bgColorLight"
android:background="@color/md_theme_surface"
android:horizontalSpacing="5dp"
android:columnWidth="60dp"
android:numColumns="auto_fit"

View File

@@ -9,9 +9,6 @@
android:paddingEnd="24dp"
android:paddingTop="16dp">
<androidx.appcompat.widget.Toolbar android:id="@+id/mytoolbar"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:titleTextStyle="@style/MyTitleTextStyle"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:minHeight="?attr/actionBarSize"

View File

@@ -9,13 +9,11 @@
android:gravity="center_horizontal">
<androidx.appcompat.widget.Toolbar
android:id="@+id/mytoolbar"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:titleTextStyle="@style/MyTitleTextStyle"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:minHeight="?attr/actionBarSize"
android:background="#00000000" />
app:theme="@style/ThemeOverlay.Material3.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.Material3.Light"
android:minHeight="?attr/actionBarSize" />
<GridView
android:id="@+id/gridview"
android:layout_width="fill_parent"

View File

@@ -9,8 +9,7 @@
<keepass2android.MeasuringRelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/relative_layout"
android:background="@color/bgColorLight">
android:id="@+id/relative_layout">
<LinearLayout
android:id="@+id/top"
android:layout_width="match_parent"
@@ -21,6 +20,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@color/md_theme_secondaryContainer"
android:layout_alignParentBottom="true"
android:baselineAligned="false">
<Button
@@ -44,59 +44,42 @@
android:layout_height="1dp"
android:layout_above="@id/bottom_bar"
android:background="#b8b8b8" />
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/main_content"
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/divider2"
android:layout_below="@id/top"
android:fitsSystemWindows="true">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="@dimen/detail_backdrop_height"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:fitsSystemWindows="true">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
android:fitsSystemWindows="true"
app:contentScrim="?attr/colorAccent"
app:expandedTitleMarginStart="16dp"
app:expandedTitleMarginEnd="24dp"
app:expandedTitleMarginBottom="20sp">
<RelativeLayout xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:fitsSystemWindows="true"
android:layout_height="fill_parent">
<ImageView
android:id="@+id/backdrop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:fitsSystemWindows="true"
android:src="@drawable/toolbar_bg"
app:layout_collapseMode="parallax" />
<TextView
android:id="@+id/filename"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="4sp"
android:layout_marginLeft="16dp"
android:textSize="10sp"
android:text="/storage/emulated/0/keepass/keepass/database.kdbx" />
</RelativeLayout>
<androidx.appcompat.widget.Toolbar
android:id="@+id/mytoolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:titleTextStyle="@style/MyTitleTextStyle"
app:layout_collapseMode="pin" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
android:layout_height="256dp"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:expandedTitleMarginEnd="64dp"
app:expandedTitleMarginStart="48dp"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<ImageView
android:id="@+id/backdrop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:fitsSystemWindows="true"
android:src="@drawable/toolbar_bg"
/>
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"/>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/scrollview"
@@ -331,11 +314,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/TextAppearance_Help_Dense"
android:textColor="@color/light_gray"
app:help_text="@string/help_quickunlock"
app:title_text="@string/enable_quickunlock"
android:text="@string/help_quickunlock"
android:background="?android:attr/selectableItemBackground"/>
android:text="@string/help_quickunlock"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/work_offline_container"
@@ -353,11 +335,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/TextAppearance_Help_Dense"
android:textColor="@color/light_gray"
app:help_text="@string/UseOfflineMode_Info"
app:title_text="@string/UseOfflineMode"
android:text="@string/UseOfflineMode_Info"
android:background="?android:attr/selectableItemBackground"/>
/>
</LinearLayout>
<Button
@@ -377,7 +359,7 @@
</keepass2android.MeasuringRelativeLayout>
<com.google.android.material.navigation.NavigationView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true">

View File

@@ -3,22 +3,22 @@
android:id="@+id/recent_files"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_height="wrap_content"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text="@string/open_recent"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:textColor="#fff" />
<ListView
/>
<keepass2android.NonScrollListView
android:id="@android:id/list"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="0dp"
android:paddingLeft="0dp" />
@@ -28,7 +28,6 @@
android:layout_height="wrap_content"
android:text="@string/show_local_backups"
android:checked="false"
android:textColor="#fff"
android:gravity="left"/>
</LinearLayout>

View File

@@ -12,9 +12,7 @@
android:layout_height="wrap_content"
android:gravity="right"
style="@style/TextAppearance_Help"
android:textColor="@color/light_gray"
android:layout_alignParentRight="true"
android:background="?android:attr/selectableItemBackground"
/>

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:id="@+id/mytoolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
local:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:titleTextStyle="@style/MyTitleTextStyle"
local:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

View File

@@ -26,11 +26,6 @@
<item android:id="@+id/menu_app_settings"
android:title="@string/menu_app_settings"
android:icon="@android:drawable/ic_menu_preferences"
app:showAsAction="ifRoom"
/>
<item android:id="@+id/menu_donate"
android:title="@string/menu_donate"
app:showAsAction="ifRoom"
app:showAsAction="ifRoom"
/>
</menu>

View File

@@ -1,44 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
<!--
Base application theme for API 21+. This theme replaces
MyTheme from resources/values/styles.xml on API 21+ devices.
-->
<style name="MyTheme" parent="MyTheme.Base">
<item name="android:windowContentTransitions">true</item>
<item name="android:windowAllowEnterTransitionOverlap">true</item>
<item name="android:windowAllowReturnTransitionOverlap">true</item>
<item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
<item name="android:windowSharedElementExitTransition">@android:transition/move</item>
<item name="android:actionModeBackground">@color/appAccentColor</item>
</style>
<style name="MyTheme_ActionBar" parent="MyTheme_ActionBar.Base">
<item name="android:actionModeBackground">@color/appAccentColor</item>
<item name="actionModeBackground">@color/appAccentColor</item>
</style>
<style name="MyTheme_Dark" parent="MyTheme_Dark.Base">
<item name="android:windowContentTransitions">true</item>
<item name="android:windowAllowEnterTransitionOverlap">true</item>
<item name="android:windowAllowReturnTransitionOverlap">true</item>
<item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
<item name="android:windowSharedElementExitTransition">@android:transition/move</item>
<item name="android:actionModeBackground">@color/appAccentColor</item>
</style>
<style name="MyTheme_ActionBar_Dark" parent="MyTheme_ActionBar_Dark.Base">
<item name="android:actionModeBackground">@color/appAccentColor</item>
<item name="actionModeBackground">@color/appAccentColor</item>
</style>
<style name="EntryFieldHeader">
<item name="android:drawablePadding">2dp</item>
<item name="android:layout_marginLeft">0dip</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:layout_marginBottom">3dp</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:textAllCaps">false</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textSize">12sp</item>
</style>
</resources>

View File

@@ -1,46 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file is based on Keepassdroid, Copyright Brian Pellin.
Keepass2Android is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Keepass2Android is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Keepass2Android. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<color name="bgColorLight">#fff</color>
<color name="bgColorDark">#0000</color>
<color name="appPrimaryColor">#8bc34a</color>
<color name="appPrimaryDarkColor">#548a2e</color>
<color name="appAccentColor">#0277bd</color>
<color name="appAccentColorDark">#015080</color>
<color name="blue_highlight">#0000dd</color>
<color name="group">#333333</color>
<color name="icon_background">#00555555</color>
<color name="icon_text">#000000</color>
<color name="light_gray">#a8a8a8</color>
<color name="dark_gray">#303030</color>
<color name="element_being_moved">#a8a8a8</color>
<color name="emphasis">#31b6e7</color>
<color name="emphasis2">#4f7a8a</color>
<color name="warning_color">#f4511e</color>
<color name="hint_color">#42000000</color>
<color name="success_color">#009688</color>
</resources>

View File

@@ -1,46 +1,143 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file is based on Keepassdroid, Copyright Brian Pellin.
Keepass2Android is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Keepass2Android is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Keepass2Android. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<color name="bgColorLight">#fff</color>
<color name="bgColorDark">#0000</color>
<color name="appPrimaryColor">#8bc34a</color>
<color name="appPrimaryDarkColor">#548a2e</color>
<color name="appAccentColor">#0277bd</color>
<color name="appAccentColorDark">#015080</color>
<color name="blue_highlight">#0000dd</color>
<color name="group">#333333</color>
<color name="icon_background">#00555555</color>
<color name="icon_text">#000000</color>
<color name="light_gray">#a8a8a8</color>
<color name="dark_gray">#303030</color>
<color name="element_being_moved">#a8a8a8</color>
<color name="emphasis">#31b6e7</color>
<color name="emphasis2">#4f7a8a</color>
<color name="warning_color">#f4511e</color>
<color name="hint_color">#42000000</color>
<color name="success_color">#009688</color>
</resources>
<color name="md_theme_primary">#4B662C</color>
<color name="md_theme_onPrimary">#FFFFFF</color>
<color name="md_theme_primaryContainer">#CCEDA4</color>
<color name="md_theme_onPrimaryContainer">#0F2000</color>
<color name="md_theme_secondary">#31628D</color>
<color name="md_theme_onSecondary">#FFFFFF</color>
<color name="md_theme_secondaryContainer">#CFE5FF</color>
<color name="md_theme_onSecondaryContainer">#001D34</color>
<color name="md_theme_tertiary">#386663</color>
<color name="md_theme_onTertiary">#FFFFFF</color>
<color name="md_theme_tertiaryContainer">#BBECE8</color>
<color name="md_theme_onTertiaryContainer">#00201E</color>
<color name="md_theme_error">#BA1A1A</color>
<color name="md_theme_onError">#FFFFFF</color>
<color name="md_theme_errorContainer">#FFDAD6</color>
<color name="md_theme_onErrorContainer">#410002</color>
<color name="md_theme_background">#F9FAEF</color>
<color name="md_theme_onBackground">#1A1C16</color>
<color name="md_theme_surface">#F5FAFB</color>
<color name="md_theme_onSurface">#171D1E</color>
<color name="md_theme_surfaceVariant">#E1E4D5</color>
<color name="md_theme_onSurfaceVariant">#44483D</color>
<color name="md_theme_outline">#75796C</color>
<color name="md_theme_outlineVariant">#C5C8BA</color>
<color name="md_theme_scrim">#000000</color>
<color name="md_theme_inverseSurface">#2B3133</color>
<color name="md_theme_inverseOnSurface">#ECF2F3</color>
<color name="md_theme_inversePrimary">#B1D18A</color>
<color name="md_theme_primaryFixed">#CCEDA4</color>
<color name="md_theme_onPrimaryFixed">#0F2000</color>
<color name="md_theme_primaryFixedDim">#B1D18A</color>
<color name="md_theme_onPrimaryFixedVariant">#344E16</color>
<color name="md_theme_secondaryFixed">#CFE5FF</color>
<color name="md_theme_onSecondaryFixed">#001D34</color>
<color name="md_theme_secondaryFixedDim">#9DCBFB</color>
<color name="md_theme_onSecondaryFixedVariant">#124A73</color>
<color name="md_theme_tertiaryFixed">#BBECE8</color>
<color name="md_theme_onTertiaryFixed">#00201E</color>
<color name="md_theme_tertiaryFixedDim">#A0D0CC</color>
<color name="md_theme_onTertiaryFixedVariant">#1F4E4B</color>
<color name="md_theme_surfaceDim">#D5DBDC</color>
<color name="md_theme_surfaceBright">#F5FAFB</color>
<color name="md_theme_surfaceContainerLowest">#FFFFFF</color>
<color name="md_theme_surfaceContainerLow">#EFF5F6</color>
<color name="md_theme_surfaceContainer">#E9EFF0</color>
<color name="md_theme_surfaceContainerHigh">#E3E9EA</color>
<color name="md_theme_surfaceContainerHighest">#DEE3E5</color>
<color name="md_theme_primary_mediumContrast">#314A12</color>
<color name="md_theme_onPrimary_mediumContrast">#FFFFFF</color>
<color name="md_theme_primaryContainer_mediumContrast">#617D40</color>
<color name="md_theme_onPrimaryContainer_mediumContrast">#FFFFFF</color>
<color name="md_theme_secondary_mediumContrast">#0B466F</color>
<color name="md_theme_onSecondary_mediumContrast">#FFFFFF</color>
<color name="md_theme_secondaryContainer_mediumContrast">#4A78A4</color>
<color name="md_theme_onSecondaryContainer_mediumContrast">#FFFFFF</color>
<color name="md_theme_tertiary_mediumContrast">#1A4A47</color>
<color name="md_theme_onTertiary_mediumContrast">#FFFFFF</color>
<color name="md_theme_tertiaryContainer_mediumContrast">#4F7D79</color>
<color name="md_theme_onTertiaryContainer_mediumContrast">#FFFFFF</color>
<color name="md_theme_error_mediumContrast">#8C0009</color>
<color name="md_theme_onError_mediumContrast">#FFFFFF</color>
<color name="md_theme_errorContainer_mediumContrast">#DA342E</color>
<color name="md_theme_onErrorContainer_mediumContrast">#FFFFFF</color>
<color name="md_theme_background_mediumContrast">#F9FAEF</color>
<color name="md_theme_onBackground_mediumContrast">#1A1C16</color>
<color name="md_theme_surface_mediumContrast">#F5FAFB</color>
<color name="md_theme_onSurface_mediumContrast">#171D1E</color>
<color name="md_theme_surfaceVariant_mediumContrast">#E1E4D5</color>
<color name="md_theme_onSurfaceVariant_mediumContrast">#40443A</color>
<color name="md_theme_outline_mediumContrast">#5D6155</color>
<color name="md_theme_outlineVariant_mediumContrast">#787C70</color>
<color name="md_theme_scrim_mediumContrast">#000000</color>
<color name="md_theme_inverseSurface_mediumContrast">#2B3133</color>
<color name="md_theme_inverseOnSurface_mediumContrast">#ECF2F3</color>
<color name="md_theme_inversePrimary_mediumContrast">#B1D18A</color>
<color name="md_theme_primaryFixed_mediumContrast">#617D40</color>
<color name="md_theme_onPrimaryFixed_mediumContrast">#FFFFFF</color>
<color name="md_theme_primaryFixedDim_mediumContrast">#49642A</color>
<color name="md_theme_onPrimaryFixedVariant_mediumContrast">#FFFFFF</color>
<color name="md_theme_secondaryFixed_mediumContrast">#4A78A4</color>
<color name="md_theme_onSecondaryFixed_mediumContrast">#FFFFFF</color>
<color name="md_theme_secondaryFixedDim_mediumContrast">#2F5F8A</color>
<color name="md_theme_onSecondaryFixedVariant_mediumContrast">#FFFFFF</color>
<color name="md_theme_tertiaryFixed_mediumContrast">#4F7D79</color>
<color name="md_theme_onTertiaryFixed_mediumContrast">#FFFFFF</color>
<color name="md_theme_tertiaryFixedDim_mediumContrast">#366461</color>
<color name="md_theme_onTertiaryFixedVariant_mediumContrast">#FFFFFF</color>
<color name="md_theme_surfaceDim_mediumContrast">#D5DBDC</color>
<color name="md_theme_surfaceBright_mediumContrast">#F5FAFB</color>
<color name="md_theme_surfaceContainerLowest_mediumContrast">#FFFFFF</color>
<color name="md_theme_surfaceContainerLow_mediumContrast">#EFF5F6</color>
<color name="md_theme_surfaceContainer_mediumContrast">#E9EFF0</color>
<color name="md_theme_surfaceContainerHigh_mediumContrast">#E3E9EA</color>
<color name="md_theme_surfaceContainerHighest_mediumContrast">#DEE3E5</color>
<color name="md_theme_primary_highContrast">#142700</color>
<color name="md_theme_onPrimary_highContrast">#FFFFFF</color>
<color name="md_theme_primaryContainer_highContrast">#314A12</color>
<color name="md_theme_onPrimaryContainer_highContrast">#FFFFFF</color>
<color name="md_theme_secondary_highContrast">#00243E</color>
<color name="md_theme_onSecondary_highContrast">#FFFFFF</color>
<color name="md_theme_secondaryContainer_highContrast">#0B466F</color>
<color name="md_theme_onSecondaryContainer_highContrast">#FFFFFF</color>
<color name="md_theme_tertiary_highContrast">#002726</color>
<color name="md_theme_onTertiary_highContrast">#FFFFFF</color>
<color name="md_theme_tertiaryContainer_highContrast">#1A4A47</color>
<color name="md_theme_onTertiaryContainer_highContrast">#FFFFFF</color>
<color name="md_theme_error_highContrast">#4E0002</color>
<color name="md_theme_onError_highContrast">#FFFFFF</color>
<color name="md_theme_errorContainer_highContrast">#8C0009</color>
<color name="md_theme_onErrorContainer_highContrast">#FFFFFF</color>
<color name="md_theme_background_highContrast">#F9FAEF</color>
<color name="md_theme_onBackground_highContrast">#1A1C16</color>
<color name="md_theme_surface_highContrast">#F5FAFB</color>
<color name="md_theme_onSurface_highContrast">#000000</color>
<color name="md_theme_surfaceVariant_highContrast">#E1E4D5</color>
<color name="md_theme_onSurfaceVariant_highContrast">#21251C</color>
<color name="md_theme_outline_highContrast">#40443A</color>
<color name="md_theme_outlineVariant_highContrast">#40443A</color>
<color name="md_theme_scrim_highContrast">#000000</color>
<color name="md_theme_inverseSurface_highContrast">#2B3133</color>
<color name="md_theme_inverseOnSurface_highContrast">#FFFFFF</color>
<color name="md_theme_inversePrimary_highContrast">#D6F7AD</color>
<color name="md_theme_primaryFixed_highContrast">#314A12</color>
<color name="md_theme_onPrimaryFixed_highContrast">#FFFFFF</color>
<color name="md_theme_primaryFixedDim_highContrast">#1B3300</color>
<color name="md_theme_onPrimaryFixedVariant_highContrast">#FFFFFF</color>
<color name="md_theme_secondaryFixed_highContrast">#0B466F</color>
<color name="md_theme_onSecondaryFixed_highContrast">#FFFFFF</color>
<color name="md_theme_secondaryFixedDim_highContrast">#002F4F</color>
<color name="md_theme_onSecondaryFixedVariant_highContrast">#FFFFFF</color>
<color name="md_theme_tertiaryFixed_highContrast">#1A4A47</color>
<color name="md_theme_onTertiaryFixed_highContrast">#FFFFFF</color>
<color name="md_theme_tertiaryFixedDim_highContrast">#003331</color>
<color name="md_theme_onTertiaryFixedVariant_highContrast">#FFFFFF</color>
<color name="md_theme_surfaceDim_highContrast">#D5DBDC</color>
<color name="md_theme_surfaceBright_highContrast">#F5FAFB</color>
<color name="md_theme_surfaceContainerLowest_highContrast">#FFFFFF</color>
<color name="md_theme_surfaceContainerLow_highContrast">#EFF5F6</color>
<color name="md_theme_surfaceContainer_highContrast">#E9EFF0</color>
<color name="md_theme_surfaceContainerHigh_highContrast">#E3E9EA</color>
<color name="md_theme_surfaceContainerHighest_highContrast">#DEE3E5</color>
</resources>

View File

@@ -9,7 +9,7 @@
<dimen name="splash_logo_width">79dp</dimen>
<dimen name="splash_logo_height">104dp</dimen>
<dimen name="splash_logo_marginTop">16dp</dimen>
<dimen name="splash_logo_marginTop">64dp</dimen>
<dimen name="splash_fontsize">30dp</dimen>

View File

@@ -23,7 +23,7 @@
<item name="android:layout_marginLeft">0dip</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textSize">18sp</item>
</style>
<style name="EntryFieldHeader">
@@ -34,7 +34,7 @@
<item name="android:layout_marginTop">8dp</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:textAllCaps">false</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textSize">12sp</item>
</style>
<style name="InfoHeader">
@@ -46,7 +46,6 @@
<item name="android:layout_marginTop">8dp</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:textAllCaps">true</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">14sp</item>
<item name="android:textStyle">bold</item>
</style>
@@ -55,7 +54,6 @@
<style name="TextAppearance_EditEntry_Small">
<item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textAllCaps">true</item>
</style>
@@ -74,7 +72,6 @@
<style name="TextAppearance_EditEntry">
<item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
<item name="android:textSize">18sp</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
<style name="TextAppearance_EditEntry_Value" parent="TextAppearance_EditEntry">
@@ -170,4 +167,84 @@
<item name="android:padding">8dp</item>
</style>
<style name="BottomBarButton" parent="@style/Widget.Material3.Button.TextButton">
<item name="android:textSize">16sp</item>
<item name="android:layout_margin">6dp</item>
<item name="android:layout_marginLeft">4dp</item>
<item name="android:layout_marginRight">4dp</item>
<item name="android:paddingBottom">10dp</item>
<item name="android:paddingTop">10dp</item>
<item name="android:paddingLeft">8dp</item>
<item name="android:paddingRight">8dp</item>
</style>
<style name="NavDrawerButton" parent="@style/Widget.Material3.Button.TextButton">
<item name="android:textSize">14sp</item>
<item name="android:layout_margin">0dp</item>
<item name="android:layout_marginLeft">16dp</item>
<item name="android:layout_marginRight">16dp</item>
<item name="android:paddingBottom">5dp</item>
<item name="android:paddingTop">5dp</item>
<item name="android:paddingLeft">8dp</item>
<item name="android:paddingRight">8dp</item>
<item name="android:drawablePadding">16dp</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textAllCaps">false</item>
<item name="android:gravity">left|center_vertical</item>
</style>
<style name="SplashScreenButton" parent="Widget.Material3.Button" >
<item name="android:textSize">16sp</item>
<item name="android:layout_height">40sp</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:layout_marginBottom">0dp</item>
<item name="android:paddingLeft">16dp</item>
<item name="android:drawablePadding">10dp</item>
<item name="android:textAllCaps">false</item>
<item name="android:gravity">left|center_vertical</item>
</style>
<style name="EntryEditSingleLine_ImageView">
<item name="android:layout_width">40dp</item>
<item name="android:layout_gravity">top</item>
<item name="android:layout_marginRight">16dp</item>
<item name="android:layout_marginTop">16dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">0</item>
</style>
<style name="EntryEditSingleLine_TextInputLayout">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</item>
</style>
<style name="EntryEditSingleLine_EditText">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:paddingTop">0dp</item>
</style>
<style name="EntryEditSingleLine_container">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:orientation">horizontal</item>
<item name="android:gravity">center_vertical</item>
</style>
<style name="GroupDetailInSearchResult">
<item name="@android:textStyle">italic</item>
</style>
</resources>

View File

@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file is based on Keepassdroid, Copyright Brian Pellin.
Keepass2Android is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Keepass2Android is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Keepass2Android. If not, see <http://www.gnu.org/licenses/>.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="BaseDark" parent="android:Theme.Holo">
</style>
<style name="NoTitleBarDark" parent="BaseDark"></style>
<style name="BaseDark_Dialog" parent="android:Theme.Holo.Dialog" />
<style name="DialogDark" parent="BaseDark_Dialog"></style>
<style name="ThemeDark" parent="BaseDark"></style>
</resources>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file is based on Keepassdroid, Copyright Brian Pellin.
Keepass2Android is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Keepass2Android is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Keepass2Android. If not, see <http://www.gnu.org/licenses/>.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- "default" for Preference activity etc.:-->
<!-- <style name="NoTitleBar" parent="BaseLight"></style> -->
</resources>

View File

@@ -1,240 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file is based on Keepassdroid, Copyright Brian Pellin.
Keepass2Android is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Keepass2Android is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Keepass2Android. If not, see <http://www.gnu.org/licenses/>.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="MyTheme_ActionBar.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">true</item>
<item name="colorPrimary">@color/appPrimaryColor</item>
<item name="colorPrimaryDark">@color/appPrimaryDarkColor</item>
<item name="colorAccent">@color/appAccentColor</item>
<item name="android:colorBackground">@color/bgColorLight</item>
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
<item name="actionModeBackground">@color/appPrimaryDarkColor</item>
<item name="actionBarStyle">@style/MyActionBar</item>
</style>
<style name="MyTheme_ActionBar" parent="MyTheme_ActionBar.Base">
<item name="actionModeBackground">@color/appAccentColor</item>
</style>
<style name="MyTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:colorBackground">@color/bgColorLight</item>
<item name="android:windowNoTitle">true</item>
<!--We will be using the toolbar so no need to show ActionBar-->
<item name="windowActionBar">false</item>
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette-->
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">@color/appPrimaryColor</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">@color/appPrimaryDarkColor</item>
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">@color/appAccentColor</item>
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
<item name="actionBarStyle">@style/MyActionBar</item>
</style>
<style name="MyTheme" parent="MyTheme.Base">
<item name="android:colorBackground">@color/appAccentColor</item>
</style>
<style name="MyTheme_Blue" parent="MyTheme">
<item name="colorPrimary">@color/appAccentColor</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">@color/appAccentColorDark</item>
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">@color/appAccentColor</item>
</style>
<style name="Base_Dialog" parent="Theme.AppCompat.Light.Dialog" />
<!-- dark themes -->
<style name="MyTheme_ActionBar_Dark.Base" parent="Theme.AppCompat">
<item name="android:colorBackground">@color/bgColorDark</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">true</item>
<item name="colorPrimary">@color/appPrimaryColor</item>
<item name="colorPrimaryDark">@color/appPrimaryDarkColor</item>
<item name="colorAccent">@color/appAccentColor</item>
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
<item name="actionModeBackground">@color/appPrimaryDarkColor</item>
<item name="actionBarStyle">@style/MyActionBar</item>
</style>
<style name="MyTheme_ActionBar_Dark" parent="MyTheme_ActionBar_Dark.Base">
<item name="actionModeBackground">@color/appAccentColor</item>
</style>
<!-- Base theme applied no matter what API -->
<style name="MyTheme_Dark.Base" parent="Theme.AppCompat.NoActionBar">
<item name="android:colorBackground">@color/bgColorDark</item>
<item name="android:windowNoTitle">true</item>
<!--We will be using the toolbar so no need to show ActionBar-->
<item name="windowActionBar">false</item>
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette-->
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">@color/appPrimaryColor</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">@color/appPrimaryDarkColor</item>
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">@color/appAccentColor</item>
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
<item name="actionBarStyle">@style/MyActionBar</item>
</style>
<style name="MyTheme_Dark" parent="MyTheme_Dark.Base">
<item name="actionModeBackground">@color/appAccentColor</item>
</style>
<style name="MyTheme_Blue_Dark" parent="MyTheme_Dark">
<item name="colorPrimary">@color/appAccentColor</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">@color/appAccentColorDark</item>
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">@color/appAccentColor</item>
</style>
<style name="Base_Dialog_Dark" parent="Theme.AppCompat.Dialog" />
<!-- end dark themen -->
<style name="BottomBarButton" parent="@style/Widget.AppCompat.Button.Borderless">
<item name="android:textSize">16sp</item>
<item name="android:layout_margin">6dp</item>
<item name="android:layout_marginLeft">4dp</item>
<item name="android:layout_marginRight">4dp</item>
<item name="android:paddingBottom">10dp</item>
<item name="android:paddingTop">10dp</item>
<item name="android:paddingLeft">8dp</item>
<item name="android:paddingRight">8dp</item>
<item name="android:textColor">#2196f3</item>
</style>
<style name="NavDrawerButton" parent="@style/Widget.AppCompat.Button.Borderless">
<item name="android:textSize">14sp</item>
<item name="android:layout_margin">0dp</item>
<item name="android:layout_marginLeft">16dp</item>
<item name="android:layout_marginRight">16dp</item>
<item name="android:paddingBottom">5dp</item>
<item name="android:paddingTop">5dp</item>
<item name="android:paddingLeft">8dp</item>
<item name="android:paddingRight">8dp</item>
<item name="android:drawablePadding">16dp</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textAllCaps">false</item>
<item name="android:gravity">left|center_vertical</item>
</style>
<style name="SplashScreenButton" parent="@style/Widget.AppCompat.Button" >
<item name="android:textSize">16sp</item>
<item name="android:layout_height">40sp</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:background">@drawable/splash_button_bg</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:layout_marginBottom">8dp</item>
<item name="android:paddingLeft">16dp</item>
<item name="android:drawablePadding">10dp</item>
<item name="android:textAllCaps">false</item>
<item name="android:gravity">left|center_vertical</item>
<item name="android:textColor">#737373</item>
</style>
<style name="EntryEditSingleLine_ImageView">
<item name="android:layout_width">40dp</item>
<item name="android:layout_gravity">top</item>
<item name="android:layout_marginRight">16dp</item>
<item name="android:layout_marginTop">16dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">0</item>
</style>
<style name="EntryEditSingleLine_TextInputLayout">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</item>
</style>
<style name="EntryEditSingleLine_EditText">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:paddingTop">0dp</item>
</style>
<style name="EntryEditSingleLine_container">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:orientation">horizontal</item>
<item name="android:gravity">center_vertical</item>
</style>
<style name="MyActionBar" parent="@style/Widget.AppCompat.ActionBar.Solid">
<item name="titleTextStyle">@style/MyTitleTextStyle</item>
</style>
<style name="MyTitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">
<item name="android:textSize">20sp</item>
<item name="android:fontFamily">@string/font_fontFamily_medium</item>
</style>
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
<item name="color">@android:color/white</item>
</style>
<style name="GroupDetailInSearchResult">
<item name="@android:textStyle">italic</item>
</style>
<style name="Dialog" parent="Base_Dialog"></style>
</resources>

View File

@@ -1,74 +1,7 @@
<resources>
<style name="AppTheme.Primary.NoActionBar" parent="Theme.Material3.DayNight.NoActionBar">
<item name="kp2aToolbarWithCloseButtonStyle">@style/Widget.Kp2a.Toolbar.WithCloseButton</item>
<style name="Kp2aTheme_ActionBar" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<item name="colorPrimary">@color/appPrimaryColor</item>
<item name="colorPrimaryVariant">@color/md_theme_primaryFixedDim_mediumContrast</item>
<item name="colorSecondary">@color/md_theme_secondaryContainer</item>
<item name="colorSecondaryVariant">@color/md_theme_secondary</item>
<item name="colorPrimaryDark">@color/appPrimaryDarkColor</item>
</style>
<style name="Kp2aTheme_NoActionBar" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorPrimary">@color/appPrimaryColor</item>
<item name="colorPrimaryVariant">@color/md_theme_primaryFixedDim_mediumContrast</item>
<item name="colorSecondary">@color/md_theme_secondaryContainer</item>
<item name="colorSecondaryVariant">@color/md_theme_secondary</item>
<item name="colorPrimaryDark">@color/appPrimaryDarkColor</item>
</style>
<style name="old_Kp2aTheme_NoActionBar" parent="Theme.Material3.DayNight.NoActionBar">
<item name="colorPrimary">@color/md_theme_primary</item>
<item name="colorOnPrimary">@color/md_theme_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_theme_secondary</item>
<item name="colorOnSecondary">@color/md_theme_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_theme_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_onTertiaryContainer</item>
<item name="colorError">@color/md_theme_error</item>
<item name="colorOnError">@color/md_theme_onError</item>
<item name="colorErrorContainer">@color/md_theme_errorContainer</item>
<item name="colorOnErrorContainer">@color/md_theme_onErrorContainer</item>
<item name="android:colorBackground">@color/md_theme_background</item>
<item name="colorOnBackground">@color/md_theme_onBackground</item>
<item name="colorSurface">@color/md_theme_surface</item>
<item name="colorOnSurface">@color/md_theme_onSurface</item>
<item name="colorSurfaceVariant">@color/md_theme_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_theme_onSurfaceVariant</item>
<item name="colorOutline">@color/md_theme_outline</item>
<item name="colorOutlineVariant">@color/md_theme_outlineVariant</item>
<item name="colorSurfaceInverse">@color/md_theme_inverseSurface</item>
<item name="colorOnSurfaceInverse">@color/md_theme_inverseOnSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_inversePrimary</item>
<item name="colorPrimaryFixed">@color/md_theme_primaryFixed</item>
<item name="colorOnPrimaryFixed">@color/md_theme_onPrimaryFixed</item>
<item name="colorPrimaryFixedDim">@color/md_theme_primaryFixedDim</item>
<item name="colorOnPrimaryFixedVariant">@color/md_theme_onPrimaryFixedVariant</item>
<item name="colorSecondaryFixed">@color/md_theme_secondaryFixed</item>
<item name="colorOnSecondaryFixed">@color/md_theme_onSecondaryFixed</item>
<item name="colorSecondaryFixedDim">@color/md_theme_secondaryFixedDim</item>
<item name="colorOnSecondaryFixedVariant">@color/md_theme_onSecondaryFixedVariant</item>
<item name="colorTertiaryFixed">@color/md_theme_tertiaryFixed</item>
<item name="colorOnTertiaryFixed">@color/md_theme_onTertiaryFixed</item>
<item name="colorTertiaryFixedDim">@color/md_theme_tertiaryFixedDim</item>
<item name="colorOnTertiaryFixedVariant">@color/md_theme_onTertiaryFixedVariant</item>
<item name="colorSurfaceDim">@color/md_theme_surfaceDim</item>
<item name="colorSurfaceBright">@color/md_theme_surfaceBright</item>
<item name="colorSurfaceContainerLowest">@color/md_theme_surfaceContainerLowest</item>
<item name="colorSurfaceContainerLow">@color/md_theme_surfaceContainerLow</item>
<item name="colorSurfaceContainer">@color/md_theme_surfaceContainer</item>
<item name="colorSurfaceContainerHigh">@color/md_theme_surfaceContainerHigh</item>
<item name="colorSurfaceContainerHighest">@color/md_theme_surfaceContainerHighest</item>
</style>
<style name="tmp_Kp2aTheme_ActionBar" parent="Theme.Material3.DayNight">
<item name="colorPrimary">@color/md_theme_primary</item>
<item name="colorOnPrimary">@color/md_theme_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_primaryContainer</item>
@@ -116,19 +49,170 @@
<item name="colorSurfaceContainerHigh">@color/md_theme_surfaceContainerHigh</item>
<item name="colorSurfaceContainerHighest">@color/md_theme_surfaceContainerHighest</item>
</style>
<style name="Kp2aTheme_BlueActionBar" parent="Kp2aTheme_ActionBar">
<item name="colorPrimary">@color/appAccentColor</item>
<item name="colorPrimaryDark">@color/appAccentColorDark</item>
<item name="colorAccent">@color/appPrimaryColor</item>
<item name="colorSurface">@color/appAccentColor</item>
<style name="AppTheme.Secondary.NoActionBar" parent="Theme.Material3.DayNight.NoActionBar">
<item name="kp2aToolbarWithCloseButtonStyle">@style/Widget.Kp2a.Toolbar.WithCloseButton</item>
<item name="colorSecondary">@color/md_theme_primary</item>
<item name="colorOnSecondary">@color/md_theme_onPrimary</item>
<item name="colorSecondaryContainer">@color/md_theme_primaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_onPrimaryContainer</item>
<item name="colorPrimary">@color/md_theme_secondary</item>
<item name="colorOnPrimary">@color/md_theme_onSecondary</item>
<item name="colorPrimaryContainer">@color/md_theme_secondaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_onTertiaryContainer</item>
<item name="colorError">@color/md_theme_error</item>
<item name="colorOnError">@color/md_theme_onError</item>
<item name="colorErrorContainer">@color/md_theme_errorContainer</item>
<item name="colorOnErrorContainer">@color/md_theme_onErrorContainer</item>
<item name="android:colorBackground">@color/md_theme_background</item>
<item name="colorOnBackground">@color/md_theme_onBackground</item>
<item name="colorSurface">@color/md_theme_surface</item>
<item name="colorOnSurface">@color/md_theme_onSurface</item>
<item name="colorSurfaceVariant">@color/md_theme_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_theme_onSurfaceVariant</item>
<item name="colorOutline">@color/md_theme_outline</item>
<item name="colorOutlineVariant">@color/md_theme_outlineVariant</item>
<item name="colorSurfaceInverse">@color/md_theme_inverseSurface</item>
<item name="colorOnSurfaceInverse">@color/md_theme_inverseOnSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_inversePrimary</item>
<item name="colorSecondaryFixed">@color/md_theme_primaryFixed</item>
<item name="colorOnSecondaryFixed">@color/md_theme_onPrimaryFixed</item>
<item name="colorSecondaryFixedDim">@color/md_theme_primaryFixedDim</item>
<item name="colorOnSecondaryFixedVariant">@color/md_theme_onPrimaryFixedVariant</item>
<item name="colorPrimaryFixed">@color/md_theme_secondaryFixed</item>
<item name="colorOnPrimaryFixed">@color/md_theme_onSecondaryFixed</item>
<item name="colorPrimaryFixedDim">@color/md_theme_secondaryFixedDim</item>
<item name="colorOnPrimaryFixedVariant">@color/md_theme_onSecondaryFixedVariant</item>
<item name="colorTertiaryFixed">@color/md_theme_tertiaryFixed</item>
<item name="colorOnTertiaryFixed">@color/md_theme_onTertiaryFixed</item>
<item name="colorTertiaryFixedDim">@color/md_theme_tertiaryFixedDim</item>
<item name="colorOnTertiaryFixedVariant">@color/md_theme_onTertiaryFixedVariant</item>
<item name="colorSurfaceDim">@color/md_theme_surfaceDim</item>
<item name="colorSurfaceBright">@color/md_theme_surfaceBright</item>
<item name="colorSurfaceContainerLowest">@color/md_theme_surfaceContainerLowest</item>
<item name="colorSurfaceContainerLow">@color/md_theme_surfaceContainerLow</item>
<item name="colorSurfaceContainer">@color/md_theme_surfaceContainer</item>
<item name="colorSurfaceContainerHigh">@color/md_theme_surfaceContainerHigh</item>
<item name="colorSurfaceContainerHighest">@color/md_theme_surfaceContainerHighest</item>
</style>
<style name="AppTheme.Primary" parent="Theme.Material3.DayNight">
<item name="kp2aToolbarWithCloseButtonStyle">@style/Widget.Kp2a.Toolbar.WithCloseButton</item>
<item name="colorPrimary">@color/md_theme_primary</item>
<item name="colorOnPrimary">@color/md_theme_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_theme_secondary</item>
<item name="colorOnSecondary">@color/md_theme_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_theme_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_onTertiaryContainer</item>
<item name="colorError">@color/md_theme_error</item>
<item name="colorOnError">@color/md_theme_onError</item>
<item name="colorErrorContainer">@color/md_theme_errorContainer</item>
<item name="colorOnErrorContainer">@color/md_theme_onErrorContainer</item>
<item name="android:colorBackground">@color/md_theme_background</item>
<item name="colorOnBackground">@color/md_theme_onBackground</item>
<item name="colorSurface">@color/md_theme_surface</item>
<item name="colorOnSurface">@color/md_theme_onSurface</item>
<item name="colorSurfaceVariant">@color/md_theme_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_theme_onSurfaceVariant</item>
<item name="colorOutline">@color/md_theme_outline</item>
<item name="colorOutlineVariant">@color/md_theme_outlineVariant</item>
<item name="colorSurfaceInverse">@color/md_theme_inverseSurface</item>
<item name="colorOnSurfaceInverse">@color/md_theme_inverseOnSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_inversePrimary</item>
<item name="colorPrimaryFixed">@color/md_theme_primaryFixed</item>
<item name="colorOnPrimaryFixed">@color/md_theme_onPrimaryFixed</item>
<item name="colorPrimaryFixedDim">@color/md_theme_primaryFixedDim</item>
<item name="colorOnPrimaryFixedVariant">@color/md_theme_onPrimaryFixedVariant</item>
<item name="colorSecondaryFixed">@color/md_theme_secondaryFixed</item>
<item name="colorOnSecondaryFixed">@color/md_theme_onSecondaryFixed</item>
<item name="colorSecondaryFixedDim">@color/md_theme_secondaryFixedDim</item>
<item name="colorOnSecondaryFixedVariant">@color/md_theme_onSecondaryFixedVariant</item>
<item name="colorTertiaryFixed">@color/md_theme_tertiaryFixed</item>
<item name="colorOnTertiaryFixed">@color/md_theme_onTertiaryFixed</item>
<item name="colorTertiaryFixedDim">@color/md_theme_tertiaryFixedDim</item>
<item name="colorOnTertiaryFixedVariant">@color/md_theme_onTertiaryFixedVariant</item>
<item name="colorSurfaceDim">@color/md_theme_surfaceDim</item>
<item name="colorSurfaceBright">@color/md_theme_surfaceBright</item>
<item name="colorSurfaceContainerLowest">@color/md_theme_surfaceContainerLowest</item>
<item name="colorSurfaceContainerLow">@color/md_theme_surfaceContainerLow</item>
<item name="colorSurfaceContainer">@color/md_theme_surfaceContainer</item>
<item name="colorSurfaceContainerHigh">@color/md_theme_surfaceContainerHigh</item>
<item name="colorSurfaceContainerHighest">@color/md_theme_surfaceContainerHighest</item>
</style>
<style name="AppTheme.Secondary" parent="Theme.Material3.DayNight">
<item name="kp2aToolbarWithCloseButtonStyle">@style/Widget.Kp2a.Toolbar.WithCloseButton</item>
<item name="colorSecondary">@color/md_theme_primary</item>
<item name="colorOnSecondary">@color/md_theme_onPrimary</item>
<item name="colorSecondaryContainer">@color/md_theme_primaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_onPrimaryContainer</item>
<item name="colorPrimary">@color/md_theme_secondary</item>
<item name="colorOnPrimary">@color/md_theme_onSecondary</item>
<item name="colorPrimaryContainer">@color/md_theme_secondaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_onTertiaryContainer</item>
<item name="colorError">@color/md_theme_error</item>
<item name="colorOnError">@color/md_theme_onError</item>
<item name="colorErrorContainer">@color/md_theme_errorContainer</item>
<item name="colorOnErrorContainer">@color/md_theme_onErrorContainer</item>
<item name="android:colorBackground">@color/md_theme_background</item>
<item name="colorOnBackground">@color/md_theme_onBackground</item>
<item name="colorSurface">@color/md_theme_surface</item>
<item name="colorOnSurface">@color/md_theme_onSurface</item>
<item name="colorSurfaceVariant">@color/md_theme_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_theme_onSurfaceVariant</item>
<item name="colorOutline">@color/md_theme_outline</item>
<item name="colorOutlineVariant">@color/md_theme_outlineVariant</item>
<item name="colorSurfaceInverse">@color/md_theme_inverseSurface</item>
<item name="colorOnSurfaceInverse">@color/md_theme_inverseOnSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_inversePrimary</item>
<item name="colorSecondaryFixed">@color/md_theme_primaryFixed</item>
<item name="colorOnSecondaryFixed">@color/md_theme_onPrimaryFixed</item>
<item name="colorSecondaryFixedDim">@color/md_theme_primaryFixedDim</item>
<item name="colorOnSecondaryFixedVariant">@color/md_theme_onPrimaryFixedVariant</item>
<item name="colorPrimaryFixed">@color/md_theme_secondaryFixed</item>
<item name="colorOnPrimaryFixed">@color/md_theme_onSecondaryFixed</item>
<item name="colorPrimaryFixedDim">@color/md_theme_secondaryFixedDim</item>
<item name="colorOnPrimaryFixedVariant">@color/md_theme_onSecondaryFixedVariant</item>
<item name="colorTertiaryFixed">@color/md_theme_tertiaryFixed</item>
<item name="colorOnTertiaryFixed">@color/md_theme_onTertiaryFixed</item>
<item name="colorTertiaryFixedDim">@color/md_theme_tertiaryFixedDim</item>
<item name="colorOnTertiaryFixedVariant">@color/md_theme_onTertiaryFixedVariant</item>
<item name="colorSurfaceDim">@color/md_theme_surfaceDim</item>
<item name="colorSurfaceBright">@color/md_theme_surfaceBright</item>
<item name="colorSurfaceContainerLowest">@color/md_theme_surfaceContainerLowest</item>
<item name="colorSurfaceContainerLow">@color/md_theme_surfaceContainerLow</item>
<item name="colorSurfaceContainer">@color/md_theme_surfaceContainer</item>
<item name="colorSurfaceContainerHigh">@color/md_theme_surfaceContainerHigh</item>
<item name="colorSurfaceContainerHighest">@color/md_theme_surfaceContainerHighest</item>
</style>
<style name="Kp2aTheme_BlueNoActionBar" parent="Kp2aTheme_NoActionBar">
<item name="colorPrimary">@color/appAccentColor</item>
<item name="colorPrimaryDark">@color/appAccentColorDark</item>
<item name="colorAccent">@color/appPrimaryColor</item>
<item name="colorSurface">@color/appAccentColor</item>
<style name="Kp2aTheme_ActionBar" parent="AppTheme.Primary"></style>
<style name="Kp2aTheme_BlueActionBar" parent="AppTheme.Secondary"></style>
<style name="Kp2aTheme_NoActionBar" parent="AppTheme.Primary.NoActionBar"></style>
<style name="Kp2aTheme_BlueNoActionBar" parent="AppTheme.Secondary.NoActionBar"></style>
<style name="Widget.Kp2a.Toolbar" parent="Widget.Material3.Toolbar.OnSurface" />
<style name="Widget.Kp2a.Toolbar.WithCloseButton">
</style>
<attr name="kp2aToolbarStyle" format="reference"/>
<attr name="kp2aToolbarWithCloseButtonStyle" format="reference"/>
<attr name="textInputSignInStyle" format="reference"/>
</resources>

View File

@@ -1,106 +1,106 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<autofill-service
xmlns:android="http://schemas.android.com/apk/res/android"
android:supportsInlineSuggestions="true"
>
>
<compatibility-package
android:name="com.android.chrome"
android:maxLongVersionCode="10000000000"/>
android:name="com.android.chrome"
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.chrome.beta"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.chrome.dev"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.chrome.canary"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.microsoft.emmx"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.opera.browser"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.opera.browser.beta"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.opera.mini.native"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.opera.mini.native.beta"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.sec.android.app.sbrowser"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.sec.android.app.sbrowser.beta"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="org.mozilla.fennec_aurora"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="org.mozilla.fennec_fdroid"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="org.mozilla.firefox"
android:maxLongVersionCode="2015836711"/>
android:maxLongVersionCode="2015836711" />
<compatibility-package
android:name="org.mozilla.firefox_beta"
android:maxLongVersionCode="2015849447"/>
android:maxLongVersionCode="2015849447" />
<compatibility-package
android:name="org.mozilla.fenix"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="org.mozilla.fenix.nightly"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="org.mozilla.reference.browser"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="org.mozilla.rocket"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.brave.browser"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.brave.browser_beta"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.brave.browser_nightly"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.google.android.apps.chrome"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.google.android.apps.chrome_dev"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.yandex.browser"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="org.codeaurora.swe.browser"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.amazon.cloud9"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="mark.via.gp"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="org.bromite.bromite"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="org.chromium.chrome"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.kiwibrowser.browser"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.ecosia.android"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
<compatibility-package
android:name="com.vivaldi.browser"
android:maxLongVersionCode="10000000000"/>
android:maxLongVersionCode="10000000000" />
</autofill-service>
</autofill-service>

View File

@@ -31,7 +31,7 @@ namespace keepass2android
{
[Activity(Label = AppNames.AppName,
MainLauncher = false,
Theme = "@style/MyTheme_Blue",
Theme = "@style/Kp2aTheme_BlueNoActionBar",
Exported = true,
LaunchMode = LaunchMode.SingleInstance)] //caution, see manifest file
public class SelectCurrentDbActivity : LifecycleAwareActivity

View File

@@ -32,7 +32,7 @@ using KeePassLib.Utility;
namespace keepass2android
{
[Activity(Label = "@string/kp2a_findUrl", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden, Theme = "@style/MyTheme_ActionBar", Exported = true)]
[Activity(Label = "@string/kp2a_findUrl", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden, Theme = "@style/Kp2aTheme_ActionBar", Exported = true)]
#if NoNet
[MetaData("android.app.searchable", Resource = "@xml/searchable_offline")]
#else

View File

@@ -4,6 +4,7 @@ using Android.App;
using Android.Content.Res;
using Android.OS;
using Android.Preferences;
using AndroidX.AppCompat.App;
using keepass2android_appSdkStyle;
namespace keepass2android
@@ -46,60 +47,29 @@ namespace keepass2android
public void ApplyTheme()
{
if (HasThemes())
{
var dark = UseDarkTheme;
int newTheme = dark ? DarkTheme : LightTheme;
_activity.SetTheme(newTheme);
_currentThemeId = newTheme;
_secureWindow = SecureWindowPref();
}
_currentThemeId = NightModePreference;
AppCompatDelegate.DefaultNightMode = _currentThemeId.Value;
_secureWindow = SecureWindowPref();
_currentIconSet = PreferenceManager.GetDefaultSharedPreferences(_activity)
.GetString("IconSetKey", _activity.PackageName);
}
public int DarkTheme
{
get
{
if (string.IsNullOrEmpty(_attributeTheme))
return Resource.Style.MyTheme_Dark;
if (_attributeTheme.Contains("MyTheme_Blue"))
return Resource.Style.MyTheme_Blue_Dark;
if (_attributeTheme.Contains("MyTheme_ActionBar"))
return Resource.Style.MyTheme_ActionBar_Dark;
return Resource.Style.MyTheme_Dark;
}
}
public int LightTheme
{
get
{
if (string.IsNullOrEmpty(_attributeTheme))
return Resource.Style.MyTheme;
if (_attributeTheme.Contains("MyTheme_Blue"))
return Resource.Style.MyTheme_Blue;
if (_attributeTheme.Contains("MyTheme_ActionBar"))
return Resource.Style.MyTheme_ActionBar;
return Resource.Style.MyTheme;
}
}
public void ReapplyTheme()
{
if (HasThemes())
int newTheme = NightModePreference;
if (newTheme != _currentThemeId)
{
int newTheme = UseDarkTheme ? DarkTheme : LightTheme;
if (newTheme != _currentThemeId)
{
Kp2aLog.Log("recreating due to theme change.");
_activity.Recreate();
return;
}
}
Kp2aLog.Log("recreating due to theme change.");
_activity.Recreate();
return;
}
if (PreferenceManager.GetDefaultSharedPreferences(_activity)
.GetString("IconSetKey", _activity.PackageName) != _currentIconSet)
@@ -118,40 +88,30 @@ namespace keepass2android
}
}
public bool UseDarkTheme
public int NightModePreference
{
get
{
var prefs = PreferenceManager.GetDefaultSharedPreferences(_activity);
string design = prefs.GetString(_activity.GetString(Resource.String.design_key), _activity.GetString(Resource.String.design_default));
if ((design == "System") && (int)Build.VERSION.SdkInt>=29 && _activity.Resources.Configuration != null)
return design switch
{
UiMode nightModeFlags = ((UiMode)((int)_activity.Resources.Configuration.UiMode & (int)Android.Content.Res.UiMode.NightMask));
if (nightModeFlags == UiMode.NightYes)
return true;
}
bool dark = (design == "Dark");
return dark;
"System" => AppCompatDelegate.ModeNightFollowSystem,
"Light" => AppCompatDelegate.ModeNightNo,
"Dark" => AppCompatDelegate.ModeNightYes,
_ => AppCompatDelegate.ModeNightFollowSystem,
};
}
}
public void ApplyDialogTheme()
{
if (HasThemes())
{
bool dark = UseDarkTheme;
_activity.SetTheme(dark ? Resource.Style.Base_Dialog_Dark : Resource.Style.Base_Dialog);
}
//TODO still needed? _activity.SetTheme(Resource.Style.Base_Dialog);
}
public bool HasThemes()
{
return ((int)Android.OS.Build.VERSION.SdkInt >= 14);
}
}
}

View File

@@ -33,6 +33,8 @@ using keepass2android.Io;
using keepass2android_appSdkStyle;
using Console = System.Console;
using Environment = Android.OS.Environment;
using Google.Android.Material.AppBar;
using Android.Util;
namespace keepass2android
{
@@ -44,7 +46,7 @@ namespace keepass2android
[Activity (Label = "@string/app_name",
ConfigurationChanges=ConfigChanges.Orientation|
ConfigChanges.KeyboardHidden,
Theme = "@style/MyTheme_Blue")]
Theme = "@style/Kp2aTheme_BlueNoActionBar")]
public class FileSelectActivity : AndroidX.AppCompat.App.AppCompatActivity
{
private readonly ActivityDesign _design;
@@ -85,9 +87,14 @@ namespace keepass2android
_dbHelper = App.Kp2a.FileDbHelper;
SetContentView(Resource.Layout.file_selection);
if (ShowRecentFiles())
var collapsingToolbar = FindViewById<CollapsingToolbarLayout>(Resource.Id.collapsing_toolbar);
collapsingToolbar.Title = "";
SetSupportActionBar(FindViewById<AndroidX.AppCompat.Widget.Toolbar>(Resource.Id.toolbar));
SupportActionBar.Title = "";
if (ShowRecentFiles())
{
_recentMode = true;
@@ -295,6 +302,17 @@ namespace keepass2android
});
};
view.FindViewById(Resource.Id.file_filename).Click += (sender, args) =>
{
TextView textView = view.FindViewById<TextView>(Resource.Id.file_filename);
String filename = (string)textView.Tag;
IOConnectionInfo ioc = new IOConnectionInfo { Path = filename };
App.Kp2a.GetFileStorage(ioc)
.PrepareFileUsage(new FileStorageSetupInitiatorActivity(_activity, _activity.OnActivityResult, null), ioc, 0, false);
};
return view;
}
@@ -371,17 +389,6 @@ namespace keepass2android
Finish();
}
public void OnListItemClick(ListView l, View v, int position, long id)
{
ICursor cursor = _dbHelper.FetchFile(id);
StartManagingCursor(cursor);
IOConnectionInfo ioc = _dbHelper.CursorToIoc(cursor);
App.Kp2a.GetFileStorage(ioc)
.PrepareFileUsage(new FileStorageSetupInitiatorActivity(this, OnActivityResult, null), ioc, 0, false);
}
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
@@ -519,6 +526,36 @@ namespace keepass2android
}
public class NonScrollListView : ListView
{
public NonScrollListView(Context context) : base(context)
{
}
public NonScrollListView(Context context, IAttributeSet attrs) : base(context, attrs)
{
}
public NonScrollListView(Context context, IAttributeSet attrs, int defStyle) : base(context, attrs, defStyle)
{
}
protected override void OnMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
// Custom height measure spec to make ListView non-scrollable
int heightMeasureSpecCustom = MeasureSpec.MakeMeasureSpec(int.MaxValue >> 2, MeasureSpecMode.AtMost);
base.OnMeasure(widthMeasureSpec, heightMeasureSpecCustom);
// Set the height of the ListView to the measured height
ViewGroup.LayoutParams layoutParams = LayoutParameters;
if (layoutParams != null)
{
layoutParams.Height = MeasuredHeight;
}
}
}
public class RecentFilesFragment : ListFragment
{
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
@@ -538,10 +575,7 @@ namespace keepass2android
{
base.OnActivityCreated(savedInstanceState);
Android.Util.Log.Debug("KP2A", "OnActCreated");
ListView.ItemClick += (sender, args) =>
{
((FileSelectActivity) Activity).OnListItemClick((ListView) sender, args.View, args.Position, args.Id);
};
RefreshList();
RegisterForContextMenu(ListView);

View File

@@ -16,7 +16,7 @@ using keepass2android_appSdkStyle;
namespace keepass2android.fileselect
{
[Activity(Label = "@string/filestorage_setup_title", Theme = "@style/MyTheme_ActionBar", ConfigurationChanges = ConfigChanges.Orientation |
[Activity(Label = "@string/filestorage_setup_title", Theme = "@style/Kp2aTheme_ActionBar", ConfigurationChanges = ConfigChanges.Orientation |
ConfigChanges.KeyboardHidden)]
public class FileStorageSetupActivity : Activity, IFileStorageSetupActivity
#if !EXCLUDE_JAVAFILESTORAGE

View File

@@ -608,7 +608,6 @@
<None Remove="Resources\layout\StartScreenButtons.xml" />
<None Remove="Resources\layout\switch_ime_activity_layout.xml" />
<None Remove="Resources\layout\text_with_help.xml" />
<None Remove="Resources\layout\toolbar.axml" />
<None Remove="Resources\layout\url_credentials.xml" />
<None Remove="Resources\menu\entry.xml" />
<None Remove="Resources\menu\entry_edit.xml" />
@@ -772,8 +771,5 @@
<AndroidResource Update="Resources\layout\preference.axml">
<SubType>AndroidResource</SubType>
</AndroidResource>
<AndroidResource Update="Resources\layout\toolbar.axml">
<SubType>AndroidResource</SubType>
</AndroidResource>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "keepass2android-appSdkStyle", "keepass2android-appSdkStyle.csproj", "{D98811AF-97B5-4B11-B8FD-4840517DE656}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D98811AF-97B5-4B11-B8FD-4840517DE656}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D98811AF-97B5-4B11-B8FD-4840517DE656}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D98811AF-97B5-4B11-B8FD-4840517DE656}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D98811AF-97B5-4B11-B8FD-4840517DE656}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B2DB32F1-2893-4FAD-83C2-890E14D8A98E}
EndGlobalSection
EndGlobal

View File

@@ -30,7 +30,7 @@ namespace keepass2android
/// <summary>
/// Activity to display search options
/// </summary>
[Activity(Label = "@string/app_name", Theme = "@style/MyTheme_ActionBar", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden)]
[Activity(Label = "@string/app_name", Theme = "@style/Kp2aTheme_ActionBar", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden)]
public class SearchActivity : LockCloseActivity
{
bool GetCheckBoxValue(int resId)

View File

@@ -32,7 +32,7 @@ namespace keepass2android.search
/// <summary>
/// Activity to show search results
/// </summary>
[Activity(Label = "@string/app_name", Theme = "@style/MyTheme_ActionBar", LaunchMode = Android.Content.PM.LaunchMode.SingleTop, Permission="keepass2android."+AppNames.PackagePart+".permission.KP2aInternalSearch", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden, Exported = true)]
[Activity(Label = "@string/app_name", Theme = "@style/Kp2aTheme_ActionBar", LaunchMode = Android.Content.PM.LaunchMode.SingleTop, Permission="keepass2android."+AppNames.PackagePart+".permission.KP2aInternalSearch", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden, Exported = true)]
#if NoNet
[MetaData("android.app.searchable", Resource = "@xml/searchable_offline")]
#else

View File

@@ -33,7 +33,7 @@ namespace keepass2android.search
/// <summary>
/// Activity to show search results
/// </summary>
[Activity(Label = "@string/app_name", Theme = "@style/MyTheme_ActionBar", LaunchMode = Android.Content.PM.LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden)]
[Activity(Label = "@string/app_name", Theme = "@style/Kp2aTheme_ActionBar", LaunchMode = Android.Content.PM.LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden)]
public class SearchTotpResults : GroupBaseActivity
{

View File

@@ -24,7 +24,7 @@ namespace keepass2android.services.Kp2aAutofill
{
[Activity(Label = "@string/app_name",
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden,
Theme = "@style/MyTheme_ActionBar",
Theme = "@style/Kp2aTheme_ActionBar",
WindowSoftInputMode = SoftInput.AdjustResize,
Permission = "keepass2android." + AppNames.PackagePart + ".permission.Kp2aChooseAutofill")]
public class ChooseForAutofillActivity : ChooseForAutofillActivityBase

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@ using KeePassLib.Cryptography.KeyDerivation;
namespace keepass2android.settings
{
public class Argon2RoundsPreference: KdfNumberParamPreference
public class Argon2RoundsPreference: KdfNumberDialogPreference
{
public Argon2RoundsPreference(Context context, IAttributeSet attrs) : base(context, attrs)
{
@@ -34,8 +34,8 @@ namespace keepass2android.settings
}
}
public class Argon2ParallelismPreference : KdfNumberParamPreference
{
public class Argon2ParallelismPreference : KdfNumberDialogPreference
{
public Argon2ParallelismPreference(Context context, IAttributeSet attrs)
: base(context, attrs)
{
@@ -66,8 +66,8 @@ namespace keepass2android.settings
}
}
public class Argon2MemoryPreference : KdfNumberParamPreference
{
public class Argon2MemoryPreference : KdfNumberDialogPreference
{
public Argon2MemoryPreference(Context context, IAttributeSet attrs)
: base(context, attrs)
{

View File

@@ -7,13 +7,14 @@ using Android.Content;
using Android.Content.PM;
using Android.Content.Res;
using Android.Graphics;
using Android.Preferences;
using AndroidX.Preference;
using Android.Runtime;
using Android.Util;
using Android.Views;
using Android.Widget;
using keepass2android.services.AutofillBase;
using keepass2android_appSdkStyle;
using Google.Android.Material.Dialog;
namespace keepass2android
{
@@ -155,15 +156,16 @@ namespace keepass2android
}
protected override void OnPrepareDialogBuilder(AlertDialog.Builder builder)
protected override void OnClick()
{
_populatorTask.Wait();
base.OnPrepareDialogBuilder(builder);
var builder = new MaterialAlertDialogBuilder(Context);
var adapter = new DisabledQueryPreferenceScreenAdapter(this, Context);
builder.SetAdapter(adapter, (sender, args) => { });
builder.SetPositiveButton(Android.Resource.String.Ok, (sender, args) =>
{
@@ -172,8 +174,10 @@ namespace keepass2android
prefs.Edit().PutStringSet("AutoFillDisabledQueries", newList).Commit();
});
var dialog = builder.Create();
dialog.Show();
}
}
}

View File

@@ -142,7 +142,7 @@ namespace keepass2android
/// <summary>
/// Activity to configure the application and database settings. The database must be unlocked, and this activity will close if it becomes locked.
/// </summary>
[Activity(Label = "@string/app_name", Theme = "@style/MyTheme_ActionBar", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden)]
[Activity(Label = "@string/app_name", Theme = "@style/Kp2aTheme_ActionBar", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden)]
public class DatabaseSettingsActivity : LockCloseActivity, PreferenceFragmentCompat.IOnPreferenceStartFragmentCallback
{

View File

@@ -158,7 +158,7 @@ namespace keepass2android.view
if (_groupActivity.IsBeingMoved(_entry.Uuid))
{
int elementBeingMoved = Context.Resources.GetColor(Resource.Color.element_being_moved);
int elementBeingMoved = Context.Resources.GetColor(Resource.Color.md_theme_inversePrimary);
_textView.SetTextColor(new Color(elementBeingMoved));
}
else

View File

@@ -99,7 +99,7 @@ namespace keepass2android.view
if (_groupBaseActivity.IsBeingMoved(_pwGroup.Uuid))
{
int elementBeingMoved = Context.Resources.GetColor(Resource.Color.element_being_moved);
int elementBeingMoved = Context.Resources.GetColor(Resource.Color.md_theme_inversePrimary);
_textview.SetTextColor(new Color(elementBeingMoved));
}
else

View File

@@ -0,0 +1,143 @@
<resources>
<color name="md_theme_primary">#ACE668</color>
<color name="md_theme_onPrimary">#1E3700</color>
<color name="md_theme_primaryContainer">#84BB43</color>
<color name="md_theme_onPrimaryContainer">#132600</color>
<color name="md_theme_secondary">#99CBFF</color>
<color name="md_theme_onSecondary">#003355</color>
<color name="md_theme_secondaryContainer">#006DAE</color>
<color name="md_theme_onSecondaryContainer">#FFFFFF</color>
<color name="md_theme_tertiary">#4CF0B1</color>
<color name="md_theme_onTertiary">#003825</color>
<color name="md_theme_tertiaryContainer">#00C48B</color>
<color name="md_theme_onTertiaryContainer">#002819</color>
<color name="md_theme_error">#FFB4AB</color>
<color name="md_theme_onError">#690005</color>
<color name="md_theme_errorContainer">#93000A</color>
<color name="md_theme_onErrorContainer">#FFDAD6</color>
<color name="md_theme_background">#11150C</color>
<color name="md_theme_onBackground">#E1E4D6</color>
<color name="md_theme_surface">#11150C</color>
<color name="md_theme_onSurface">#E1E4D6</color>
<color name="md_theme_surfaceVariant">#424939</color>
<color name="md_theme_onSurfaceVariant">#C2C9B4</color>
<color name="md_theme_outline">#8C9380</color>
<color name="md_theme_outlineVariant">#424939</color>
<color name="md_theme_scrim">#000000</color>
<color name="md_theme_inverseSurface">#E1E4D6</color>
<color name="md_theme_inverseOnSurface">#2E3228</color>
<color name="md_theme_inversePrimary">#3E6A00</color>
<color name="md_theme_primaryFixed">#B9F474</color>
<color name="md_theme_onPrimaryFixed">#0F2000</color>
<color name="md_theme_primaryFixedDim">#9ED75B</color>
<color name="md_theme_onPrimaryFixedVariant">#2E4F00</color>
<color name="md_theme_secondaryFixed">#CFE5FF</color>
<color name="md_theme_onSecondaryFixed">#001D34</color>
<color name="md_theme_secondaryFixedDim">#99CBFF</color>
<color name="md_theme_onSecondaryFixedVariant">#004A78</color>
<color name="md_theme_tertiaryFixed">#5DFDBE</color>
<color name="md_theme_onTertiaryFixed">#002114</color>
<color name="md_theme_tertiaryFixedDim">#36E0A3</color>
<color name="md_theme_onTertiaryFixedVariant">#005138</color>
<color name="md_theme_surfaceDim">#11150C</color>
<color name="md_theme_surfaceBright">#373A31</color>
<color name="md_theme_surfaceContainerLowest">#0C0F08</color>
<color name="md_theme_surfaceContainerLow">#191D14</color>
<color name="md_theme_surfaceContainer">#1D2118</color>
<color name="md_theme_surfaceContainerHigh">#282B22</color>
<color name="md_theme_surfaceContainerHighest">#32362C</color>
<color name="md_theme_primary_mediumContrast">#ACE668</color>
<color name="md_theme_onPrimary_mediumContrast">#122500</color>
<color name="md_theme_primaryContainer_mediumContrast">#84BB43</color>
<color name="md_theme_onPrimaryContainer_mediumContrast">#000000</color>
<color name="md_theme_secondary_mediumContrast">#A2CFFF</color>
<color name="md_theme_onSecondary_mediumContrast">#00182B</color>
<color name="md_theme_secondaryContainer_mediumContrast">#3F96DE</color>
<color name="md_theme_onSecondaryContainer_mediumContrast">#000000</color>
<color name="md_theme_tertiary_mediumContrast">#4CF0B1</color>
<color name="md_theme_onTertiary_mediumContrast">#002618</color>
<color name="md_theme_tertiaryContainer_mediumContrast">#00C48B</color>
<color name="md_theme_onTertiaryContainer_mediumContrast">#000000</color>
<color name="md_theme_error_mediumContrast">#FFBAB1</color>
<color name="md_theme_onError_mediumContrast">#370001</color>
<color name="md_theme_errorContainer_mediumContrast">#FF5449</color>
<color name="md_theme_onErrorContainer_mediumContrast">#000000</color>
<color name="md_theme_background_mediumContrast">#11150C</color>
<color name="md_theme_onBackground_mediumContrast">#E1E4D6</color>
<color name="md_theme_surface_mediumContrast">#11150C</color>
<color name="md_theme_onSurface_mediumContrast">#FAFCEE</color>
<color name="md_theme_surfaceVariant_mediumContrast">#424939</color>
<color name="md_theme_onSurfaceVariant_mediumContrast">#C7CDB8</color>
<color name="md_theme_outline_mediumContrast">#9FA592</color>
<color name="md_theme_outlineVariant_mediumContrast">#7F8673</color>
<color name="md_theme_scrim_mediumContrast">#000000</color>
<color name="md_theme_inverseSurface_mediumContrast">#E1E4D6</color>
<color name="md_theme_inverseOnSurface_mediumContrast">#282B22</color>
<color name="md_theme_inversePrimary_mediumContrast">#2F5100</color>
<color name="md_theme_primaryFixed_mediumContrast">#B9F474</color>
<color name="md_theme_onPrimaryFixed_mediumContrast">#081400</color>
<color name="md_theme_primaryFixedDim_mediumContrast">#9ED75B</color>
<color name="md_theme_onPrimaryFixedVariant_mediumContrast">#223D00</color>
<color name="md_theme_secondaryFixed_mediumContrast">#CFE5FF</color>
<color name="md_theme_onSecondaryFixed_mediumContrast">#001223</color>
<color name="md_theme_secondaryFixedDim_mediumContrast">#99CBFF</color>
<color name="md_theme_onSecondaryFixedVariant_mediumContrast">#00395E</color>
<color name="md_theme_tertiaryFixed_mediumContrast">#5DFDBE</color>
<color name="md_theme_onTertiaryFixed_mediumContrast">#00150C</color>
<color name="md_theme_tertiaryFixedDim_mediumContrast">#36E0A3</color>
<color name="md_theme_onTertiaryFixedVariant_mediumContrast">#003F2A</color>
<color name="md_theme_surfaceDim_mediumContrast">#11150C</color>
<color name="md_theme_surfaceBright_mediumContrast">#373A31</color>
<color name="md_theme_surfaceContainerLowest_mediumContrast">#0C0F08</color>
<color name="md_theme_surfaceContainerLow_mediumContrast">#191D14</color>
<color name="md_theme_surfaceContainer_mediumContrast">#1D2118</color>
<color name="md_theme_surfaceContainerHigh_mediumContrast">#282B22</color>
<color name="md_theme_surfaceContainerHighest_mediumContrast">#32362C</color>
<color name="md_theme_primary_highContrast">#F4FFE0</color>
<color name="md_theme_onPrimary_highContrast">#000000</color>
<color name="md_theme_primaryContainer_highContrast">#A2DC5F</color>
<color name="md_theme_onPrimaryContainer_highContrast">#000000</color>
<color name="md_theme_secondary_highContrast">#FAFAFF</color>
<color name="md_theme_onSecondary_highContrast">#000000</color>
<color name="md_theme_secondaryContainer_highContrast">#A2CFFF</color>
<color name="md_theme_onSecondaryContainer_highContrast">#000000</color>
<color name="md_theme_tertiary_highContrast">#EEFFF3</color>
<color name="md_theme_onTertiary_highContrast">#000000</color>
<color name="md_theme_tertiaryContainer_highContrast">#3CE4A7</color>
<color name="md_theme_onTertiaryContainer_highContrast">#000000</color>
<color name="md_theme_error_highContrast">#FFF9F9</color>
<color name="md_theme_onError_highContrast">#000000</color>
<color name="md_theme_errorContainer_highContrast">#FFBAB1</color>
<color name="md_theme_onErrorContainer_highContrast">#000000</color>
<color name="md_theme_background_highContrast">#11150C</color>
<color name="md_theme_onBackground_highContrast">#E1E4D6</color>
<color name="md_theme_surface_highContrast">#11150C</color>
<color name="md_theme_onSurface_highContrast">#FFFFFF</color>
<color name="md_theme_surfaceVariant_highContrast">#424939</color>
<color name="md_theme_onSurfaceVariant_highContrast">#F7FEE7</color>
<color name="md_theme_outline_highContrast">#C7CDB8</color>
<color name="md_theme_outlineVariant_highContrast">#C7CDB8</color>
<color name="md_theme_scrim_highContrast">#000000</color>
<color name="md_theme_inverseSurface_highContrast">#E1E4D6</color>
<color name="md_theme_inverseOnSurface_highContrast">#000000</color>
<color name="md_theme_inversePrimary_highContrast">#1A3000</color>
<color name="md_theme_primaryFixed_highContrast">#BDF978</color>
<color name="md_theme_onPrimaryFixed_highContrast">#000000</color>
<color name="md_theme_primaryFixedDim_highContrast">#A2DC5F</color>
<color name="md_theme_onPrimaryFixedVariant_highContrast">#0C1A00</color>
<color name="md_theme_secondaryFixed_highContrast">#D7E9FF</color>
<color name="md_theme_onSecondaryFixed_highContrast">#000000</color>
<color name="md_theme_secondaryFixedDim_highContrast">#A2CFFF</color>
<color name="md_theme_onSecondaryFixedVariant_highContrast">#00182B</color>
<color name="md_theme_tertiaryFixed_highContrast">#79FFC6</color>
<color name="md_theme_onTertiaryFixed_highContrast">#000000</color>
<color name="md_theme_tertiaryFixedDim_highContrast">#3CE4A7</color>
<color name="md_theme_onTertiaryFixedVariant_highContrast">#001B10</color>
<color name="md_theme_surfaceDim_highContrast">#11150C</color>
<color name="md_theme_surfaceBright_highContrast">#373A31</color>
<color name="md_theme_surfaceContainerLowest_highContrast">#0C0F08</color>
<color name="md_theme_surfaceContainerLow_highContrast">#191D14</color>
<color name="md_theme_surfaceContainer_highContrast">#1D2118</color>
<color name="md_theme_surfaceContainerHigh_highContrast">#282B22</color>
<color name="md_theme_surfaceContainerHighest_highContrast">#32362C</color>
</resources>

View File

@@ -0,0 +1,106 @@
<resources>
<style name="Kp2aTheme_NoActionBar" parent="Theme.Material3.DayNight.NoActionBar">
<item name="colorPrimary">@color/md_theme_primary</item>
<item name="colorOnPrimary">@color/md_theme_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_theme_secondary</item>
<item name="colorOnSecondary">@color/md_theme_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_theme_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_onTertiaryContainer</item>
<item name="colorError">@color/md_theme_error</item>
<item name="colorOnError">@color/md_theme_onError</item>
<item name="colorErrorContainer">@color/md_theme_errorContainer</item>
<item name="colorOnErrorContainer">@color/md_theme_onErrorContainer</item>
<item name="android:colorBackground">@color/md_theme_background</item>
<item name="colorOnBackground">@color/md_theme_onBackground</item>
<item name="colorSurface">@color/md_theme_surface</item>
<item name="colorOnSurface">@color/md_theme_onSurface</item>
<item name="colorSurfaceVariant">@color/md_theme_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_theme_onSurfaceVariant</item>
<item name="colorOutline">@color/md_theme_outline</item>
<item name="colorOutlineVariant">@color/md_theme_outlineVariant</item>
<item name="colorSurfaceInverse">@color/md_theme_inverseSurface</item>
<item name="colorOnSurfaceInverse">@color/md_theme_inverseOnSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_inversePrimary</item>
<item name="colorPrimaryFixed">@color/md_theme_primaryFixed</item>
<item name="colorOnPrimaryFixed">@color/md_theme_onPrimaryFixed</item>
<item name="colorPrimaryFixedDim">@color/md_theme_primaryFixedDim</item>
<item name="colorOnPrimaryFixedVariant">@color/md_theme_onPrimaryFixedVariant</item>
<item name="colorSecondaryFixed">@color/md_theme_secondaryFixed</item>
<item name="colorOnSecondaryFixed">@color/md_theme_onSecondaryFixed</item>
<item name="colorSecondaryFixedDim">@color/md_theme_secondaryFixedDim</item>
<item name="colorOnSecondaryFixedVariant">@color/md_theme_onSecondaryFixedVariant</item>
<item name="colorTertiaryFixed">@color/md_theme_tertiaryFixed</item>
<item name="colorOnTertiaryFixed">@color/md_theme_onTertiaryFixed</item>
<item name="colorTertiaryFixedDim">@color/md_theme_tertiaryFixedDim</item>
<item name="colorOnTertiaryFixedVariant">@color/md_theme_onTertiaryFixedVariant</item>
<item name="colorSurfaceDim">@color/md_theme_surfaceDim</item>
<item name="colorSurfaceBright">@color/md_theme_surfaceBright</item>
<item name="colorSurfaceContainerLowest">@color/md_theme_surfaceContainerLowest</item>
<item name="colorSurfaceContainerLow">@color/md_theme_surfaceContainerLow</item>
<item name="colorSurfaceContainer">@color/md_theme_surfaceContainer</item>
<item name="colorSurfaceContainerHigh">@color/md_theme_surfaceContainerHigh</item>
<item name="colorSurfaceContainerHighest">@color/md_theme_surfaceContainerHighest</item>
</style>
<style name="Kp2aTheme_ActionBar" parent="Theme.Material3.DayNight.DarkActionBar">
<item name="colorPrimary">@color/md_theme_primary</item>
<item name="colorOnPrimary">@color/md_theme_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_theme_secondary</item>
<item name="colorOnSecondary">@color/md_theme_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_theme_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_onTertiaryContainer</item>
<item name="colorError">@color/md_theme_error</item>
<item name="colorOnError">@color/md_theme_onError</item>
<item name="colorErrorContainer">@color/md_theme_errorContainer</item>
<item name="colorOnErrorContainer">@color/md_theme_onErrorContainer</item>
<item name="android:colorBackground">@color/md_theme_background</item>
<item name="colorOnBackground">@color/md_theme_onBackground</item>
<item name="colorSurface">@color/md_theme_surface</item>
<item name="colorOnSurface">@color/md_theme_onSurface</item>
<item name="colorSurfaceVariant">@color/md_theme_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_theme_onSurfaceVariant</item>
<item name="colorOutline">@color/md_theme_outline</item>
<item name="colorOutlineVariant">@color/md_theme_outlineVariant</item>
<item name="colorSurfaceInverse">@color/md_theme_inverseSurface</item>
<item name="colorOnSurfaceInverse">@color/md_theme_inverseOnSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_inversePrimary</item>
<item name="colorPrimaryFixed">@color/md_theme_primaryFixed</item>
<item name="colorOnPrimaryFixed">@color/md_theme_onPrimaryFixed</item>
<item name="colorPrimaryFixedDim">@color/md_theme_primaryFixedDim</item>
<item name="colorOnPrimaryFixedVariant">@color/md_theme_onPrimaryFixedVariant</item>
<item name="colorSecondaryFixed">@color/md_theme_secondaryFixed</item>
<item name="colorOnSecondaryFixed">@color/md_theme_onSecondaryFixed</item>
<item name="colorSecondaryFixedDim">@color/md_theme_secondaryFixedDim</item>
<item name="colorOnSecondaryFixedVariant">@color/md_theme_onSecondaryFixedVariant</item>
<item name="colorTertiaryFixed">@color/md_theme_tertiaryFixed</item>
<item name="colorOnTertiaryFixed">@color/md_theme_onTertiaryFixed</item>
<item name="colorTertiaryFixedDim">@color/md_theme_tertiaryFixedDim</item>
<item name="colorOnTertiaryFixedVariant">@color/md_theme_onTertiaryFixedVariant</item>
<item name="colorSurfaceDim">@color/md_theme_surfaceDim</item>
<item name="colorSurfaceBright">@color/md_theme_surfaceBright</item>
<item name="colorSurfaceContainerLowest">@color/md_theme_surfaceContainerLowest</item>
<item name="colorSurfaceContainerLow">@color/md_theme_surfaceContainerLow</item>
<item name="colorSurfaceContainer">@color/md_theme_surfaceContainer</item>
<item name="colorSurfaceContainerHigh">@color/md_theme_surfaceContainerHigh</item>
<item name="colorSurfaceContainerHighest">@color/md_theme_surfaceContainerHighest</item>
</style>
<style name="Kp2aTheme_BlueActionBar" parent="Kp2aTheme_ActionBar">
<item name="colorPrimary">@color/appAccentColor</item>
<item name="colorPrimaryDark">@color/appAccentColorDark</item>
<item name="colorAccent">@color/appPrimaryColor</item>
<item name="colorSurface">@color/appAccentColor</item>
</style>
</resources>