Fix expand file info view

This commit is contained in:
J-Jamet
2020-10-29 13:33:49 +01:00
parent 50b5ad1799
commit 1c61f54df6
2 changed files with 58 additions and 78 deletions

View File

@@ -149,96 +149,76 @@
android:tint="?android:attr/textColorHintInverse"
style="@style/KeepassDXStyle.ImageButton.Simple.Secondary"/>
<LinearLayout
android:id="@+id/file_modification_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="start|center_vertical"
android:orientation="vertical"
android:paddingTop="8dp"
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginStart="@dimen/default_margin"
android:layout_marginRight="@dimen/default_margin"
android:layout_marginEnd="@dimen/default_margin"
app:layout_constraintEnd_toStartOf="@+id/file_size"
app:layout_constraintStart_toEndOf="@+id/file_modify_button"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/file_modification_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/entry_modified"
android:textColor="?android:attr/textColorHintInverse"
android:textSize="12sp" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/file_modification"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorHintInverse"
tools:text="Aug 21, 2020 3:40:14 PM" />
</LinearLayout>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/file_size"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="end|center_vertical"
android:paddingTop="8dp"
android:textColor="?android:attr/textColorHintInverse"
app:layout_constraintBottom_toBottomOf="@+id/file_modification_container"
app:layout_constraintEnd_toStartOf="@+id/file_delete_button"
tools:text="8 bytes" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/file_delete_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_remove_from_list"
android:src="@drawable/ic_content_delete_white_24dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:tint="?android:attr/textColorHintInverse"
style="@style/KeepassDXStyle.ImageButton.Simple.Secondary"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/file_path"
android:textIsSelectable="true"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@+id/file_metadata_container"
app:layout_constraintTop_toBottomOf="@+id/file_modification_container"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/file_modify_button"
app:layout_constraintEnd_toEndOf="parent"
tools:text="/path/to/DatabaseName.kdbx"
android:textColor="?android:attr/textColorHintInverse"
android:gravity="end"
android:gravity="center_vertical|end"
android:textStyle="italic"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/file_metadata_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/file_precise_info_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@+id/file_delete_button">
<LinearLayout
android:id="@+id/file_modification_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingStart="@dimen/default_margin"
android:paddingLeft="@dimen/default_margin"
android:paddingEnd="@dimen/default_margin"
android:paddingRight="@dimen/default_margin"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@+id/file_size"
android:orientation="vertical"
android:gravity="start|center_vertical" >
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/file_modification_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/entry_modified"
android:textColor="?android:attr/textColorHintInverse"
android:textSize="12sp" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/file_modification"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Aug 21, 2020 3:40:14 PM"
android:textColor="?android:attr/textColorHintInverse"/>
</LinearLayout>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/file_size"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="end|center_vertical"
android:textColor="?android:attr/textColorHintInverse"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/file_modification_container"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginStart="@dimen/default_margin"
android:layout_marginEnd="@dimen/default_margin"
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginRight="@dimen/default_margin"
tools:text="8 bytes" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/file_delete_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_remove_from_list"
android:src="@drawable/ic_content_delete_white_24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:tint="?android:attr/textColorHintInverse"
style="@style/KeepassDXStyle.ImageButton.Simple.Secondary"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>

View File

@@ -25,7 +25,7 @@
<dimen name="card_view_margin">12dp</dimen>
<dimen name="card_view_padding">14dp</dimen>
<dimen name="card_view_margin_bottom">10dp</dimen>
<dimen name="item_file_info_height">160dp</dimen>
<dimen name="item_file_info_height">148dp</dimen>
<dimen name="icon_size">32dp</dimen>
<dimen name="lock_button_size">48dp</dimen>
<dimen name="hidden_lock_button_size">0dp</dimen>