Compare commits
13 Commits
ui-improve
...
feature/sc
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9be215c295 | ||
![]() |
bb97a023de | ||
![]() |
edb4907bf5 | ||
![]() |
a718c7ed7e | ||
![]() |
4f11789f26 | ||
![]() |
eb15861b13 | ||
![]() |
8c2c8049c8 | ||
![]() |
2f3761b0a7 | ||
![]() |
260bc8adb2 | ||
![]() |
87e979635b | ||
![]() |
0c9c163755 | ||
![]() |
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>
|
||||
|
@@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
@@ -216,4 +219,5 @@
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="Resolve" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
@@ -1,4 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
@@ -36,4 +39,5 @@
|
||||
android:hint="@string/hint_pass"
|
||||
android:importantForAccessibility="no" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
@@ -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)
|
||||
{
|
||||
@@ -1425,18 +1425,20 @@ namespace keepass2android
|
||||
App.Kp2a.SetQuickUnlockEnabled(cbQuickUnlock.Checked);
|
||||
App.Kp2a.ScreenLockWasEnabledWhenOpeningDatabase =
|
||||
(((KeyguardManager)GetSystemService(Context.KeyguardService)!)!).IsDeviceSecure;
|
||||
App.Kp2a.QuickUnlockBlockedWhenDeviceNotSecureWhenOpeningDatabase = PreferenceManager.GetDefaultSharedPreferences(this)
|
||||
.GetBoolean(GetString(Resource.String.QuickUnlockBlockedWhenDeviceNotSecure_key), true);
|
||||
|
||||
if ((_loadDbFileTask != null) && (App.Kp2a.OfflineMode != _loadDbTaskOffline))
|
||||
if ((_loadDbFileTask != null) && (App.Kp2a.OfflineMode != _loadDbTaskOffline))
|
||||
{
|
||||
if (App.Kp2a == null)
|
||||
if (App.Kp2a == null)
|
||||
throw new NullPointerException("App.Kp2a");
|
||||
//keep the loading result if we loaded in online-mode (now offline) and the task is completed
|
||||
if (!App.Kp2a.OfflineMode || !_loadDbFileTask.IsCompleted)
|
||||
{
|
||||
//discard the pre-loading task
|
||||
_loadDbFileTask = null;
|
||||
_loadDbFileTask = null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//avoid password being visible while loading:
|
||||
|
@@ -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));
|
||||
|
||||
@@ -175,7 +178,7 @@ namespace keepass2android
|
||||
App.Kp2a.Lock(false);
|
||||
};
|
||||
|
||||
if (App.Kp2a.ScreenLockWasEnabledWhenOpeningDatabase == false)
|
||||
if (App.Kp2a.ScreenLockWasEnabledWhenOpeningDatabase == false && App.Kp2a.QuickUnlockBlockedWhenDeviceNotSecureWhenOpeningDatabase)
|
||||
{
|
||||
FindViewById(Resource.Id.QuickUnlockForm).Visibility = ViewStates.Gone;
|
||||
FindViewById(Resource.Id.QuickUnlockBlocked).Visibility = ViewStates.Visible;
|
||||
|
@@ -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">
|
||||
@@ -78,11 +78,11 @@ android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingTop="16dp">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/QuickUnlockForm">
|
||||
|
||||
<TextView
|
||||
@@ -94,6 +94,12 @@ android:paddingRight="16dp"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<EditText
|
||||
android:inputType="textPassword"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -117,8 +123,8 @@ android:paddingRight="16dp"
|
||||
android:src="@drawable/baseline_fingerprint_24"
|
||||
android:scaleType="fitXY"
|
||||
android:background="?android:selectableItemBackground" />
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@@ -1,4 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
@@ -75,4 +78,5 @@
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
@@ -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,4 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
@@ -41,4 +44,5 @@
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
@@ -1,4 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
@@ -27,4 +30,5 @@
|
||||
android:importantForAccessibility="no"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
@@ -1,4 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
@@ -42,4 +45,5 @@
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
@@ -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>
|
@@ -1,61 +0,0 @@
|
||||
<?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:layout_height="fill_parent"
|
||||
android:layout_margin="12dip">
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<EditText
|
||||
android:id="@+id/sftp_host"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:text="144.76.169.229"
|
||||
android:hint="@string/hint_sftp_host" />
|
||||
<TextView
|
||||
android:id="@+id/portsep"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=":" />
|
||||
<EditText
|
||||
android:id="@+id/sftp_port"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="number"
|
||||
android:text="22"
|
||||
android:hint="@string/hint_sftp_port" />
|
||||
</LinearLayout>
|
||||
<EditText
|
||||
android:id="@+id/sftp_user"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:text="philipp"
|
||||
android:hint="@string/hint_username" />
|
||||
<EditText
|
||||
android:id="@+id/sftp_password"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:singleLine="true"
|
||||
android:text="l2uientTjVhvyfzNpksa"
|
||||
android:hint="@string/hint_pass" />
|
||||
<TextView
|
||||
android:id="@+id/initial_dir"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dip"
|
||||
android:layout_marginTop="4dip"
|
||||
android:text="@string/initial_directory" />
|
||||
<EditText
|
||||
android:id="@+id/sftp_initial_dir"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:text="/home/philipp" />
|
||||
</LinearLayout>
|
@@ -1,4 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
@@ -197,3 +200,5 @@
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
@@ -1,4 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
@@ -52,4 +55,5 @@
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
@@ -1,7 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<EditText
|
||||
android:id="@+id/cred_username"
|
||||
android:layout_width="fill_parent"
|
||||
@@ -22,4 +25,5 @@
|
||||
android:layout_below="@id/cred_password"
|
||||
android:entries="@array/cred_remember_modes"
|
||||
android:id="@+id/cred_remember_mode" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
@@ -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>
|
@@ -123,6 +123,7 @@
|
||||
<string name="QuickUnlockLength_default">3</string>
|
||||
<string name="QuickUnlockIconHidden_key">QuickUnlockIconHidden_key</string>
|
||||
<string name="QuickUnlockIconHidden16_key">QuickUnlockIconHidden16_key</string>
|
||||
<string name="QuickUnlockBlockedWhenDeviceNotSecure_key">QuickUnlockBlockedWhenDeviceNotSecure_key</string>
|
||||
|
||||
<string name="UsageCount_key">UsageCount</string>
|
||||
<string name="LastInfoVersionCode_key">LastInfoVersion</string>
|
||||
|
@@ -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>
|
||||
|
@@ -330,6 +330,8 @@
|
||||
<string name="QuickUnlockIconHidden_summary">QuickUnlock unfortunately does not work without displaying a notification icon. Select this option to use a transparent icon.</string>
|
||||
<string name="QuickUnlockIconHidden16_title">Hide QuickUnlock icon</string>
|
||||
<string name="QuickUnlockIconHidden16_summary">QuickUnlock requires a notification to work properly. Select this option to display a notification without an icon.</string>
|
||||
<string name="QuickUnlockBlockedWhenDeviceNotSecure_summary">Block entering the QuickUnlock key if the device is not secured by screen lock. This prevents shoulder surfing attacks. Only disable this option if you understand the risk. Note that QuickUnlock can still be used with biometrics.</string>
|
||||
<string name="QuickUnlockBlockedWhenDeviceNotSecure_title">Block QuickUnlock when device is not secure</string>
|
||||
<string name="QuickUnlockLength_title">Length of QuickUnlock key</string>
|
||||
<string name="QuickUnlockLength_summary">Maximum number of characters used as QuickUnlock password.</string>
|
||||
<string name="QuickUnlockHideLength_title">Hide QuickUnlock length</string>
|
||||
|
@@ -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" />
|
||||
|
@@ -26,6 +26,14 @@
|
||||
android:defaultValue="false"
|
||||
android:title="@string/QuickUnlockIconHidden_title"
|
||||
android:key="@string/QuickUnlockIconHidden_key" />
|
||||
<CheckBoxPreference
|
||||
android:enabled="true"
|
||||
android:persistent="true"
|
||||
android:summary="@string/QuickUnlockBlockedWhenDeviceNotSecure_summary"
|
||||
android:defaultValue="true"
|
||||
android:title="@string/QuickUnlockBlockedWhenDeviceNotSecure_title"
|
||||
android:key="@string/QuickUnlockBlockedWhenDeviceNotSecure_key" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:enabled="true"
|
||||
android:persistent="true"
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -354,6 +354,7 @@ namespace keepass2android
|
||||
}
|
||||
|
||||
public bool ScreenLockWasEnabledWhenOpeningDatabase { get; set; }
|
||||
public bool QuickUnlockBlockedWhenDeviceNotSecureWhenOpeningDatabase { get; set; }
|
||||
|
||||
|
||||
public bool QuickUnlockEnabled { get; private set; }
|
||||
|
@@ -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