Compare commits
6 Commits
v1.14-pre0
...
update/tar
Author | SHA1 | Date | |
---|---|---|---|
![]() |
260bc8adb2 | ||
![]() |
87e979635b | ||
![]() |
0c9c163755 | ||
![]() |
74ceea562b | ||
![]() |
c6a5362ecb | ||
![]() |
93cf4f790c |
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -339,7 +339,7 @@ jobs:
|
||||
with:
|
||||
name: archive APK ('net' built on ${{ github.job }})
|
||||
path: |
|
||||
src/keepass2android-app/bin/Release/net8.0-android/publish/*.apk
|
||||
src/keepass2android-app/bin/Release/net9.0-android/publish/*.apk
|
||||
|
||||
- name: Select the manifest
|
||||
run: |
|
||||
@@ -365,5 +365,5 @@ jobs:
|
||||
with:
|
||||
name: archive APK ('nonet' built on ${{ github.job }})
|
||||
path: |
|
||||
src/keepass2android-app/bin/Release/net8.0-android/publish/*.apk
|
||||
src/keepass2android-app/bin/Release/net9.0-android/publish/*.apk
|
||||
|
||||
|
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -130,8 +130,8 @@ jobs:
|
||||
name: keepass2android_${{ matrix.target }}_${{ matrix.flavor }}
|
||||
# the first line is for "apk" target, the second line is for "apk_split" target
|
||||
path: |
|
||||
src/keepass2android-app/bin/Release/net8.0-android/publish/*.apk
|
||||
src/keepass2android-app/bin/Release/net8.0-android/*/publish/*.apk
|
||||
src/keepass2android-app/bin/Release/net9.0-android/publish/*.apk
|
||||
src/keepass2android-app/bin/Release/net9.0-android/*/publish/*.apk
|
||||
|
||||
- name: List apks
|
||||
run: find . -type f -name "*.apk"
|
||||
@@ -142,5 +142,5 @@ jobs:
|
||||
with:
|
||||
draft: true
|
||||
files: |
|
||||
src/keepass2android-app/bin/Release/net8.0-android/publish/*.apk
|
||||
src/keepass2android-app/bin/Release/net8.0-android/*/publish/*.apk
|
||||
src/keepass2android-app/bin/Release/net9.0-android/publish/*.apk
|
||||
src/keepass2android-app/bin/Release/net9.0-android/*/publish/*.apk
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<TargetFramework>net9.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<TargetFramework>net9.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<TargetFramework>net9.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<TargetFramework>net9.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<TargetFramework>net9.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<TargetFramework>net9.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<TargetFramework>net9.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<TargetFramework>net9.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<TargetFramework>net9.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<TargetFramework>net9.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<TargetFramework>net9.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
@@ -278,7 +278,8 @@ namespace keepass2android
|
||||
|
||||
builder.SetNegativeButton(Android.Resource.String.Cancel, evtH);
|
||||
builder.SetTitle(activity.GetString(Resource.String.enter_sftp_login_title));
|
||||
Dialog dialog = builder.Create();
|
||||
builder.SetCancelable(false);
|
||||
Dialog dialog = builder.Create();
|
||||
|
||||
dialog.Show();
|
||||
#endif
|
||||
@@ -351,7 +352,8 @@ namespace keepass2android
|
||||
|
||||
builder.SetNegativeButton(Android.Resource.String.Cancel, evtH);
|
||||
builder.SetTitle(activity.GetString(Resource.String.enter_http_login_title));
|
||||
Dialog dialog = builder.Create();
|
||||
builder.SetCancelable(false);
|
||||
Dialog dialog = builder.Create();
|
||||
|
||||
dialog.Show();
|
||||
#endif
|
||||
@@ -454,7 +456,8 @@ namespace keepass2android
|
||||
|
||||
builder.SetNegativeButton(Android.Resource.String.Cancel, evtH);
|
||||
builder.SetTitle(activity.GetString(Resource.String.enter_ftp_login_title));
|
||||
Dialog dialog = builder.Create();
|
||||
builder.SetCancelable(false);
|
||||
Dialog dialog = builder.Create();
|
||||
|
||||
dialog.Show();
|
||||
#endif
|
||||
@@ -514,7 +517,8 @@ namespace keepass2android
|
||||
|
||||
builder.SetNegativeButton(Android.Resource.String.Cancel, evtH);
|
||||
builder.SetTitle(activity.GetString(Resource.String.enter_mega_login_title));
|
||||
Dialog dialog = builder.Create();
|
||||
builder.SetCancelable(false);
|
||||
Dialog dialog = builder.Create();
|
||||
|
||||
dialog.Show();
|
||||
#endif
|
||||
@@ -579,7 +583,8 @@ namespace keepass2android
|
||||
|
||||
builder.SetNegativeButton(Android.Resource.String.Cancel, evtH);
|
||||
builder.SetTitle(activity.GetString(subtype == "owncloud" ? Resource.String.enter_owncloud_login_title : Resource.String.enter_nextcloud_login_title));
|
||||
Dialog dialog = builder.Create();
|
||||
builder.SetCancelable(false);
|
||||
Dialog dialog = builder.Create();
|
||||
dlgContents.FindViewById<EditText>(Resource.Id.owncloud_url).SetHint(subtype == "owncloud" ? Resource.String.hint_owncloud_url : Resource.String.hint_nextcloud_url);
|
||||
dialog.Show();
|
||||
#endif
|
||||
|
@@ -145,12 +145,14 @@ namespace keepass2android
|
||||
protected override void OnCreate(Bundle savedInstanceState) {
|
||||
_design.ApplyTheme();
|
||||
base.OnCreate(savedInstanceState);
|
||||
|
||||
|
||||
SetContentView(Resource.Layout.generate_password);
|
||||
SetResult(KeePass.ExitNormal);
|
||||
|
||||
|
||||
var prefs = GetPreferences(FileCreationMode.Private);
|
||||
new Util.InsetListener(FindViewById(Resource.Id.main_container)).Apply();
|
||||
|
||||
|
||||
var prefs = GetPreferences(FileCreationMode.Private);
|
||||
|
||||
|
||||
|
||||
|
@@ -43,7 +43,7 @@
|
||||
</queries>
|
||||
|
||||
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34" />
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="35" />
|
||||
<permission android:description="@string/permission_desc2" android:icon="@drawable/ic_notify_locked" android:label="KP2A entry search" android:name="keepass2android.keepass2android_debug.permission.KP2aInternalSearch" android:protectionLevel="signature" />
|
||||
<permission android:description="@string/permission_desc3" android:icon="@drawable/ic_launcher" android:label="KP2A choose autofill dataset" android:name="keepass2android.keepass2android_debug.permission.Kp2aChooseAutofill" android:protectionLevel="signature" />
|
||||
<application
|
||||
|
@@ -42,7 +42,7 @@
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
</intent>
|
||||
</queries>
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34" />
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="35" />
|
||||
|
||||
<permission android:description="@string/permission_desc2" android:icon="@drawable/ic_launcher" android:label="KP2A entry search" android:name="keepass2android.keepass2android.permission.KP2aInternalSearch" android:protectionLevel="signature" />
|
||||
<permission android:description="@string/permission_desc3" android:icon="@drawable/ic_launcher" android:label="KP2A choose autofill dataset" android:name="keepass2android.keepass2android.permission.Kp2aChooseAutofill" android:protectionLevel="signature" />
|
||||
|
@@ -42,7 +42,7 @@
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
</intent>
|
||||
</queries>
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34" />
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="35" />
|
||||
|
||||
<permission android:description="@string/permission_desc2" android:icon="@drawable/ic_launcher_offline" android:label="KP2A entry search" android:name="keepass2android.keepass2android_nonet.permission.KP2aInternalSearch" android:protectionLevel="signature" />
|
||||
<permission android:description="@string/permission_desc3" android:icon="@drawable/ic_launcher_offline" android:label="KP2A choose autofill dataset" android:name="keepass2android.keepass2android_nonet.permission.Kp2aChooseAutofill" android:protectionLevel="signature" />
|
||||
|
@@ -15,6 +15,36 @@ This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file
|
||||
along with Keepass2Android. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Content.PM;
|
||||
using Android.Database;
|
||||
using Android.Graphics;
|
||||
using Android.Graphics.Drawables;
|
||||
using Android.OS;
|
||||
using Android.Preferences;
|
||||
using Android.Runtime;
|
||||
using Android.Text;
|
||||
using Android.Views;
|
||||
using Android.Views.InputMethods;
|
||||
using Android.Widget;
|
||||
using AndroidX.AppCompat.App;
|
||||
using AndroidX.CoordinatorLayout.Widget;
|
||||
using AndroidX.Core.Content;
|
||||
using AndroidX.Core.View;
|
||||
using AndroidX.DrawerLayout.Widget;
|
||||
using Google.Android.Material.AppBar;
|
||||
using Google.Android.Material.Dialog;
|
||||
using Java.Lang;
|
||||
using Java.Net;
|
||||
using KeeChallenge;
|
||||
using keepass2android;
|
||||
using keepass2android.Io;
|
||||
using keepass2android.Utils;
|
||||
using Keepass2android.Pluginsdk;
|
||||
using KeePassLib.Keys;
|
||||
using KeePassLib.Serialization;
|
||||
using OtpKeyProv;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -23,49 +53,17 @@ using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using keepass2android;
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Database;
|
||||
using Android.Graphics.Drawables;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
using Android.Views;
|
||||
using Android.Views.InputMethods;
|
||||
using Android.Widget;
|
||||
using Java.Net;
|
||||
using Android.Preferences;
|
||||
using Android.Text;
|
||||
using Android.Content.PM;
|
||||
using Android.Graphics;
|
||||
using AndroidX.AppCompat.App;
|
||||
using AndroidX.CoordinatorLayout.Widget;
|
||||
using AndroidX.Core.View;
|
||||
using AndroidX.DrawerLayout.Widget;
|
||||
using Google.Android.Material.AppBar;
|
||||
using Google.Android.Material.Dialog;
|
||||
using Java.Lang;
|
||||
using KeePassLib.Keys;
|
||||
using KeePassLib.Serialization;
|
||||
using Keepass2android.Pluginsdk;
|
||||
using OtpKeyProv;
|
||||
using keepass2android.Io;
|
||||
using keepass2android.Utils;
|
||||
|
||||
using File = Java.IO.File;
|
||||
using FileNotFoundException = Java.IO.FileNotFoundException;
|
||||
|
||||
using Object = Java.Lang.Object;
|
||||
using Process = Android.OS.Process;
|
||||
|
||||
using KeeChallenge;
|
||||
using static Android.Locations.GpsStatus;
|
||||
using AlertDialog = Android.App.AlertDialog;
|
||||
using ClipboardManager = Android.Content.ClipboardManager;
|
||||
using Enum = System.Enum;
|
||||
using Exception = System.Exception;
|
||||
using File = Java.IO.File;
|
||||
using FileNotFoundException = Java.IO.FileNotFoundException;
|
||||
using Object = Java.Lang.Object;
|
||||
using Process = Android.OS.Process;
|
||||
using String = System.String;
|
||||
using Toolbar = AndroidX.AppCompat.Widget.Toolbar;
|
||||
using AndroidX.Core.Content;
|
||||
|
||||
namespace keepass2android
|
||||
{
|
||||
@@ -651,7 +649,7 @@ namespace keepass2android
|
||||
_activityDesign.ApplyTheme();
|
||||
base.OnCreate(savedInstanceState);
|
||||
|
||||
_intentReceiver = new PasswordActivityBroadcastReceiver(this);
|
||||
_intentReceiver = new PasswordActivityBroadcastReceiver(this);
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.AddAction(Intent.ActionScreenOff);
|
||||
ContextCompat.RegisterReceiver(this, _intentReceiver, filter, (int)ReceiverFlags.Exported);
|
||||
@@ -1165,7 +1163,9 @@ namespace keepass2android
|
||||
changeDbButton.Click += (sender, args) => GoToFileSelectActivity();
|
||||
|
||||
Util.MoveBottomBarButtons(Resource.Id.change_db, Resource.Id.pass_ok, Resource.Id.bottom_bar, this);
|
||||
}
|
||||
Util.InsetListener.ForBottomElement(FindViewById(Resource.Id.bottom_bar)).Apply();
|
||||
Util.InsetListener.ForTopElement(FindViewById(Resource.Id.appbar)).Apply();
|
||||
}
|
||||
|
||||
private void OnOk(bool usedFingerprintUnlock = false)
|
||||
{
|
||||
|
@@ -81,8 +81,11 @@ namespace keepass2android
|
||||
|
||||
SetContentView(Resource.Layout.QuickUnlock);
|
||||
|
||||
Util.InsetListener.ForBottomElement(FindViewById(Resource.Id.bottom_bar)).Apply();
|
||||
Util.InsetListener.ForTopElement(FindViewById(Resource.Id.appbar)).Apply();
|
||||
|
||||
var collapsingToolbar = FindViewById<CollapsingToolbarLayout>(Resource.Id.collapsing_toolbar);
|
||||
|
||||
var collapsingToolbar = FindViewById<CollapsingToolbarLayout>(Resource.Id.collapsing_toolbar);
|
||||
collapsingToolbar.SetTitle(GetString(Resource.String.QuickUnlock_prefs));
|
||||
SetSupportActionBar(FindViewById<Toolbar>(Resource.Id.toolbar));
|
||||
|
||||
|
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
android:fitsSystemWindows="false">
|
||||
<keepass2android.MeasuringLinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
@@ -17,7 +17,7 @@ android:fitsSystemWindows="true">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:fitsSystemWindows="true">
|
||||
android:fitsSystemWindows="false">
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
@@ -28,7 +28,7 @@ android:fitsSystemWindows="true">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||
android:fitsSystemWindows="true"
|
||||
android:fitsSystemWindows="false"
|
||||
app:expandedTitleMarginStart="16dp"
|
||||
app:expandedTitleMarginEnd="24dp"
|
||||
app:expandedTitleMarginBottom="20sp">
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main_container"
|
||||
android:layout_width="fill_parent"
|
||||
android:background="?android:attr/colorBackground"
|
||||
android:layout_height="fill_parent">
|
||||
@@ -322,4 +323,3 @@
|
||||
</ScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<keepass2android.FixedDrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
>
|
||||
<!-- activity view -->
|
||||
<keepass2android.MeasuringLinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
@@ -17,14 +17,13 @@
|
||||
android:id="@+id/main_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:fitsSystemWindows="true">
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/detail_backdrop_height"
|
||||
android:fitsSystemWindows="true"
|
||||
android:fitsSystemWindows="false"
|
||||
android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
@@ -32,14 +31,17 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||
android:fitsSystemWindows="true"
|
||||
app:expandedTitleMarginStart="48dp"
|
||||
android:fitsSystemWindows="false"
|
||||
app:collapsedTitleGravity="center"
|
||||
app:expandedTitleGravity="bottom|left"
|
||||
|
||||
app:expandedTitleMarginStart="8dp"
|
||||
app:expandedTitleMarginEnd="24dp"
|
||||
app:expandedTitleMarginBottom="20sp">
|
||||
|
||||
<RelativeLayout xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="fill_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:fitsSystemWindows="false"
|
||||
android:layout_height="fill_parent">
|
||||
<ImageView
|
||||
android:id="@+id/backdrop"
|
||||
@@ -52,7 +54,7 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
|
||||
android:layout_marginBottom="0sp"
|
||||
android:layout_marginLeft="48dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
@@ -446,4 +448,4 @@
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</com.google.android.material.navigation.NavigationView>
|
||||
</keepass2android.FixedDrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
@@ -0,0 +1,22 @@
|
||||
<resources>
|
||||
<style name="Kp2aTheme_ActionBar" parent="AppTheme.Primary">
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="Kp2aTheme_BlueActionBar" parent="AppTheme.Secondary">
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="Kp2aTheme_NoActionBar" parent="AppTheme.Primary.NoActionBar">
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="Kp2aTheme_BlueNoActionBar" parent="AppTheme.Secondary.NoActionBar">
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
</resources>
|
22
src/keepass2android-app/Resources/values-v35/themes.xml
Normal file
22
src/keepass2android-app/Resources/values-v35/themes.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<resources>
|
||||
<style name="Kp2aTheme_ActionBar" parent="AppTheme.Primary">
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="Kp2aTheme_BlueActionBar" parent="AppTheme.Secondary">
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="Kp2aTheme_NoActionBar" parent="AppTheme.Primary.NoActionBar">
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="Kp2aTheme_BlueNoActionBar" parent="AppTheme.Secondary.NoActionBar">
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
</resources>
|
@@ -4,7 +4,7 @@
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
|
||||
<dimen name="detail_backdrop_height">200dp</dimen>
|
||||
<dimen name="detail_backdrop_height">250dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
|
||||
<dimen name="splash_logo_width">79dp</dimen>
|
||||
|
@@ -253,12 +253,12 @@
|
||||
<item name="android:statusBarColor">@color/statusbar_color_green</item></style>
|
||||
<style name="Kp2aTheme_BlueActionBar" parent="AppTheme.Secondary"></style>
|
||||
|
||||
<style name="Kp2aTheme_NoActionBar" parent="AppTheme.Primary.NoActionBar">
|
||||
<style name="Kp2aTheme_NoActionBar" parent="AppTheme.Primary.NoActionBar">
|
||||
<item name="android:statusBarColor">@color/statusbar_color_green</item>
|
||||
</style>
|
||||
<style name="Kp2aTheme_BlueNoActionBar" parent="AppTheme.Secondary.NoActionBar">
|
||||
|
||||
</style>
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<style name="Widget.Kp2a.Toolbar" parent="Widget.Material3.Toolbar.OnSurface" />
|
||||
|
@@ -35,7 +35,9 @@ using Android.Graphics.Drawables;
|
||||
using Android.Hardware.Display;
|
||||
using Android.Util;
|
||||
using Android.Views.InputMethods;
|
||||
using AndroidX.Core.View;
|
||||
using AndroidX.Core.View.InputMethod;
|
||||
using AndroidX.ViewPager2.Widget;
|
||||
using Google.Android.Material.Dialog;
|
||||
using KeePass.Util;
|
||||
using keepass2android;
|
||||
@@ -738,7 +740,73 @@ namespace keepass2android
|
||||
|
||||
|
||||
|
||||
public class InsetListener: Java.Lang.Object, IOnApplyWindowInsetsListener
|
||||
{
|
||||
private View _targetView;
|
||||
private readonly int _insetsType;
|
||||
private int _initialPaddingLeft;
|
||||
private int _initialPaddingTop;
|
||||
private int _initialPaddingRight;
|
||||
private int _initialPaddingBottom;
|
||||
|
||||
|
||||
public bool EnabledPaddingLeft { get; set; } = true;
|
||||
public bool EnablePaddingTop { get; set; } = true;
|
||||
public bool EnablePaddingRight { get; set; } = true;
|
||||
public bool EnablePaddingBottom { get; set; } = true;
|
||||
|
||||
public InsetListener(View targetView, int insetsType)
|
||||
{
|
||||
_targetView = targetView;
|
||||
_insetsType = insetsType;
|
||||
_initialPaddingLeft = targetView.PaddingLeft;
|
||||
_initialPaddingTop = targetView.PaddingTop;
|
||||
_initialPaddingRight = targetView.PaddingRight;
|
||||
_initialPaddingBottom = targetView.PaddingBottom;
|
||||
}
|
||||
|
||||
public InsetListener(View targetView): this(targetView, WindowInsetsCompat.Type.SystemBars())
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public WindowInsetsCompat OnApplyWindowInsets(View v, WindowInsetsCompat insets)
|
||||
{
|
||||
var systemBarsInsets = insets.GetInsets(_insetsType);
|
||||
|
||||
_targetView.SetPadding(
|
||||
_initialPaddingLeft + (EnabledPaddingLeft ? systemBarsInsets.Left : 0),
|
||||
_initialPaddingTop + (EnablePaddingTop ? systemBarsInsets.Top : 0),
|
||||
_initialPaddingRight + (EnablePaddingRight ? systemBarsInsets.Right : 0),
|
||||
_initialPaddingBottom + (EnablePaddingBottom ? systemBarsInsets.Bottom : 0)
|
||||
);
|
||||
|
||||
|
||||
return insets;
|
||||
}
|
||||
|
||||
public static InsetListener ForBottomElement(View view)
|
||||
{
|
||||
return new InsetListener(view, WindowInsetsCompat.Type.Ime() | WindowInsetsCompat.Type.SystemBars() | WindowInsetsCompat.Type.DisplayCutout())
|
||||
{
|
||||
EnablePaddingTop = false
|
||||
};
|
||||
}
|
||||
public static InsetListener ForTopElement(View view)
|
||||
{
|
||||
return new InsetListener(view, WindowInsetsCompat.Type.SystemBars() | WindowInsetsCompat.Type.DisplayCutout())
|
||||
{
|
||||
EnablePaddingBottom = false
|
||||
};
|
||||
}
|
||||
|
||||
public void Apply()
|
||||
{
|
||||
ViewCompat.SetOnApplyWindowInsetsListener(_targetView, this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void MoveBottomBarButtons(int btn1Id, int btn2Id, int bottomBarId, Activity context)
|
||||
{
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<TargetFramework>net9.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<RootNamespace>keepass2android</RootNamespace>
|
||||
<OutputType>Exe</OutputType>
|
||||
|
@@ -1217,7 +1217,7 @@ namespace keepass2android
|
||||
{
|
||||
_design.ApplyTheme();
|
||||
base.OnCreate(savedInstanceState);
|
||||
|
||||
new Util.InsetListener(FindViewById(Resource.Id.settings)).Apply();
|
||||
|
||||
}
|
||||
|
||||
|
@@ -163,6 +163,7 @@ namespace keepass2android
|
||||
{
|
||||
_design.ApplyTheme();
|
||||
base.OnCreate(savedInstanceState);
|
||||
new Util.InsetListener(FindViewById(Resource.Id.settings)).Apply();
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user