Better activity_password layout implementation

This commit is contained in:
J-Jamet
2021-03-26 13:45:08 +01:00
parent e5cfb6b7eb
commit 16cc4c5c97

View File

@@ -23,8 +23,6 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/background_repeat"
android:backgroundTint="?android:attr/textColor"
tools:targetApi="o"> tools:targetApi="o">
<com.kunzisoft.keepass.view.SpecialModeView <com.kunzisoft.keepass.view.SpecialModeView
@@ -38,14 +36,15 @@
android:id="@+id/activity_password_coordinator_layout" android:id="@+id/activity_password_coordinator_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:background="@drawable/background_repeat"
android:backgroundTint="?android:attr/textColor"
app:layout_constraintTop_toBottomOf="@+id/special_mode_view" app:layout_constraintTop_toBottomOf="@+id/special_mode_view"
app:layout_constraintBottom_toTopOf="@+id/activity_password_info_container"> app:layout_constraintBottom_toTopOf="@+id/activity_password_footer">
<com.google.android.material.appbar.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar" android:id="@+id/app_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:fitsSystemWindows="true">
<com.google.android.material.appbar.CollapsingToolbarLayout <com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/toolbar_layout" android:id="@+id/toolbar_layout"
@@ -209,41 +208,44 @@
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<LinearLayout <LinearLayout
android:id="@+id/activity_password_info_container" android:id="@+id/activity_password_footer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@+id/activity_password_open_button"> app:layout_constraintBottom_toBottomOf="parent">
<androidx.appcompat.widget.AppCompatTextView <LinearLayout
android:id="@+id/activity_password_info_text" android:id="@+id/activity_password_info_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:orientation="vertical">
android:minHeight="24dp" <androidx.appcompat.widget.AppCompatTextView
android:paddingStart="24dp" android:id="@+id/activity_password_info_text"
android:paddingLeft="24dp" android:layout_width="match_parent"
android:paddingEnd="24dp" android:layout_height="wrap_content"
android:paddingRight="24dp" android:gravity="center"
style="@style/KeepassDXStyle.TextAppearance.Tiny" android:minHeight="24dp"
android:text="@string/warning_database_link_revoked" android:paddingStart="24dp"
android:textColor="?attr/textColorInverse" android:paddingLeft="24dp"
android:background="?attr/colorAccent" android:paddingEnd="24dp"
app:layout_constraintBottom_toTopOf="@+id/activity_password_info_delimiter" android:paddingRight="24dp"
android:layout_gravity="bottom"/> style="@style/KeepassDXStyle.TextAppearance.Tiny"
<View android:text="@string/warning_database_link_revoked"
android:id="@+id/activity_password_info_delimiter" android:textColor="?attr/textColorInverse"
android:background="?attr/colorAccent"
app:layout_constraintBottom_toTopOf="@+id/activity_password_info_delimiter"
android:layout_gravity="bottom"/>
<View
android:id="@+id/activity_password_info_delimiter"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/colorAccentLight"/>
</LinearLayout>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/activity_password_open_button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="wrap_content"
android:background="?attr/colorAccentLight"/> android:focusable="true"
android:text="@string/menu_open" />
</LinearLayout> </LinearLayout>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/activity_password_open_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:focusable="true"
android:text="@string/menu_open" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>