Make sure attachment box isn't cut off on small screens

This commit is contained in:
cketti 2021-09-05 20:28:46 +02:00
parent a40189167c
commit 65b25df582
5 changed files with 26 additions and 5 deletions

View file

@ -2,7 +2,7 @@
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="300dp"
style="@style/AttachmentCard"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"

View file

@ -2,13 +2,13 @@
<com.fsck.k9.ui.messageview.AttachmentView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
style="@style/AttachmentView"
android:layout_height="wrap_content"
android:paddingBottom="4dp"
android:id="@+id/attachment">
<androidx.cardview.widget.CardView
android:layout_width="300dp"
style="@style/AttachmentCard"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<com.fsck.k9.ui.messageview.LockedAttachmentView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
style="@style/AttachmentView"
android:layout_height="wrap_content"
android:paddingBottom="4dip"
android:inAnimation="@anim/fade_in"
@ -9,7 +9,7 @@
app:previewInitialChild="0">
<androidx.cardview.widget.CardView
android:layout_width="300dp"
style="@style/AttachmentCard"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AttachmentView" parent="">
<item name="android:layout_width">wrap_content</item>
</style>
<style name="AttachmentCard" parent="">
<item name="android:layout_width">300dp</item>
</style>
</resources>

View file

@ -99,5 +99,13 @@
<item name="android:textSize">22sp</item>
</style>
<style name="AttachmentView" parent="">
<item name="android:layout_width">match_parent</item>
</style>
<style name="AttachmentCard" parent="">
<item name="android:layout_width">match_parent</item>
</style>
</resources>