fix bottom bar in QuickUnlock and Password activity
This commit is contained in:
@@ -6,29 +6,29 @@ using Android.Widget;
|
|||||||
|
|
||||||
namespace keepass2android
|
namespace keepass2android
|
||||||
{
|
{
|
||||||
public class MeasuringRelativeLayout : RelativeLayout
|
public class MeasuringLinearLayout : LinearLayout
|
||||||
{
|
{
|
||||||
protected MeasuringRelativeLayout(IntPtr javaReference, JniHandleOwnership transfer)
|
protected MeasuringLinearLayout(IntPtr javaReference, JniHandleOwnership transfer)
|
||||||
: base(javaReference, transfer)
|
: base(javaReference, transfer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public MeasuringRelativeLayout(Context context)
|
public MeasuringLinearLayout(Context context)
|
||||||
: base(context)
|
: base(context)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public MeasuringRelativeLayout(Context context, IAttributeSet attrs)
|
public MeasuringLinearLayout(Context context, IAttributeSet attrs)
|
||||||
: base(context, attrs)
|
: base(context, attrs)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public MeasuringRelativeLayout(Context context, IAttributeSet attrs, int defStyleAttr)
|
public MeasuringLinearLayout(Context context, IAttributeSet attrs, int defStyleAttr)
|
||||||
: base(context, attrs, defStyleAttr)
|
: base(context, attrs, defStyleAttr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public MeasuringRelativeLayout(Context context, IAttributeSet attrs, int defStyleAttr, int defStyleRes)
|
public MeasuringLinearLayout(Context context, IAttributeSet attrs, int defStyleAttr, int defStyleRes)
|
||||||
: base(context, attrs, defStyleAttr, defStyleRes)
|
: base(context, attrs, defStyleAttr, defStyleRes)
|
||||||
{
|
{
|
||||||
}
|
}
|
@@ -153,7 +153,7 @@ namespace keepass2android
|
|||||||
|
|
||||||
|
|
||||||
private string mDrawerTitle;
|
private string mDrawerTitle;
|
||||||
private MeasuringRelativeLayout.MeasureArgs _measureArgs;
|
private MeasuringLinearLayout.MeasureArgs _measureArgs;
|
||||||
private ActivityDesign _activityDesign;
|
private ActivityDesign _activityDesign;
|
||||||
private BiometricDecryption _biometricDec;
|
private BiometricDecryption _biometricDec;
|
||||||
private PasswordActivityBroadcastReceiver _intentReceiver;
|
private PasswordActivityBroadcastReceiver _intentReceiver;
|
||||||
@@ -813,7 +813,7 @@ namespace keepass2android
|
|||||||
|
|
||||||
private void InitializeToolbarCollapsing()
|
private void InitializeToolbarCollapsing()
|
||||||
{
|
{
|
||||||
var rootview = FindViewById<MeasuringRelativeLayout>(Resource.Id.relative_layout);
|
var rootview = FindViewById<MeasuringLinearLayout>(Resource.Id.main_layout);
|
||||||
rootview.ViewTreeObserver.GlobalLayout += (sender, args2) =>
|
rootview.ViewTreeObserver.GlobalLayout += (sender, args2) =>
|
||||||
{
|
{
|
||||||
Android.Util.Log.Debug("KP2A", "GlobalLayout");
|
Android.Util.Log.Debug("KP2A", "GlobalLayout");
|
||||||
|
@@ -6,54 +6,17 @@ xmlns:app="http://schemas.android.com/apk/res-auto"
|
|||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:fitsSystemWindows="true">
|
android:fitsSystemWindows="true">
|
||||||
<keepass2android.MeasuringRelativeLayout
|
<keepass2android.MeasuringLinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
android:id="@+id/relative_layout">
|
android:id="@+id/relative_layout">
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/top"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
android:orientation="horizontal" />
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/bottom_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:baselineAligned="false">
|
|
||||||
<Button
|
|
||||||
android:text="@string/QuickUnlock_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="@style/BottomBarButton"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:id="@+id/QuickUnlock_button"
|
|
||||||
/>
|
|
||||||
<Button
|
|
||||||
android:text="@string/QuickUnlock_lockButton"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="@style/BottomBarButton"
|
|
||||||
android:id="@+id/QuickUnlock_buttonLock"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
<View
|
|
||||||
android:id="@+id/divider2"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_above="@id/bottom_bar"
|
|
||||||
android:background="#b8b8b8" />
|
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
android:id="@+id/main_content"
|
android:id="@+id/main_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_above="@id/divider2"
|
android:layout_weight="1"
|
||||||
android:layout_below="@id/top"
|
|
||||||
android:fitsSystemWindows="true">
|
android:fitsSystemWindows="true">
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
@@ -169,6 +132,39 @@ android:paddingRight="16dp"
|
|||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
<View
|
||||||
|
android:id="@+id/divider2"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:background="#b8b8b8" />
|
||||||
|
|
||||||
</keepass2android.MeasuringRelativeLayout>
|
<RelativeLayout
|
||||||
|
android:id="@+id/bottom_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
android:text="@string/QuickUnlock_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/BottomBarButton"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:id="@+id/QuickUnlock_button"
|
||||||
|
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
android:text="@string/QuickUnlock_lockButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/BottomBarButton"
|
||||||
|
android:id="@+id/QuickUnlock_buttonLock"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</keepass2android.MeasuringLinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@@ -6,49 +6,18 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:fitsSystemWindows="true">
|
android:fitsSystemWindows="true">
|
||||||
<!-- activity view -->
|
<!-- activity view -->
|
||||||
<keepass2android.MeasuringRelativeLayout
|
<keepass2android.MeasuringLinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:id="@+id/relative_layout">
|
android:orientation="vertical"
|
||||||
<LinearLayout
|
android:id="@+id/main_layout">
|
||||||
android:id="@+id/top"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:orientation="horizontal" />
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/bottom_bar"
|
|
||||||
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
|
|
||||||
android:id="@+id/change_db"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:text="@string/menu_change_db"
|
|
||||||
style="@style/BottomBarButton" />
|
|
||||||
<Button
|
|
||||||
android:id="@+id/pass_ok"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:text="@string/unlock_database_button"
|
|
||||||
style="@style/BottomBarButton" />
|
|
||||||
</RelativeLayout>
|
|
||||||
<View
|
|
||||||
android:id="@+id/divider2"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_above="@id/bottom_bar"
|
|
||||||
android:background="#b8b8b8" />
|
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
android:id="@+id/main_content"
|
android:id="@+id/main_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
@@ -356,7 +325,38 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
</keepass2android.MeasuringRelativeLayout>
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/divider2"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:background="#b8b8b8" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/bottom_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
android:id="@+id/change_db"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:text="@string/menu_change_db"
|
||||||
|
style="@style/BottomBarButton" />
|
||||||
|
<Button
|
||||||
|
android:id="@+id/pass_ok"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:text="@string/unlock_database_button"
|
||||||
|
style="@style/BottomBarButton" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</keepass2android.MeasuringLinearLayout>
|
||||||
<com.google.android.material.navigation.NavigationView
|
<com.google.android.material.navigation.NavigationView
|
||||||
android:id="@+id/navigation"
|
android:id="@+id/navigation"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Reference in New Issue
Block a user