adjust layouts and colors for Edge-to-Edge with transparent status bar as is default in Android 35+
This commit is contained in:
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user