summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorstom79 <tschneider.ac@gmail.com>2018-09-23 11:56:53 +0200
committerstom79 <tschneider.ac@gmail.com>2018-09-23 11:56:53 +0200
commit0b6b2fe9d27f54b42d87c67c1387254e533e9ea2 (patch)
tree260c019df18254122e6bfb37d110cce62731c1e7 /app
parent14ab8846224f3b37d32f9f00f3d3bcd136626f4f (diff)
Fit preview images in a grid
Diffstat (limited to 'app')
-rw-r--r--app/src/main/res/layout/drawer_status.xml49
-rw-r--r--app/src/main/res/layout/drawer_status_compact.xml48
-rw-r--r--app/src/main/res/layout/drawer_status_focused.xml49
3 files changed, 94 insertions, 52 deletions
diff --git a/app/src/main/res/layout/drawer_status.xml b/app/src/main/res/layout/drawer_status.xml
index 2b1639114..5470ced9c 100644
--- a/app/src/main/res/layout/drawer_status.xml
+++ b/app/src/main/res/layout/drawer_status.xml
@@ -280,12 +280,14 @@
<RelativeLayout
android:id="@+id/status_horizontal_document_container"
android:visibility="gone"
+ android:layout_marginTop="5dp"
android:layout_width="match_parent"
- android:layout_height="200dp">
+ android:layout_height="wrap_content">
- <HorizontalScrollView
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
>
<LinearLayout
android:layout_width="wrap_content"
@@ -293,14 +295,15 @@
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:orientation="horizontal"
- >
+ android:baselineAligned="false">
<RelativeLayout
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
+ android:layout_weight="1"
android:layout_height="match_parent"
>
<ImageView
android:id="@+id/status_prev1_h"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:layout_height="match_parent"
@@ -315,7 +318,8 @@
tools:ignore="ContentDescription" />
</RelativeLayout>
<RelativeLayout
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
+ android:layout_weight="1"
android:layout_height="match_parent"
android:layout_marginLeft="1dp"
android:layout_marginStart="1dp"
@@ -323,7 +327,7 @@
<ImageView
android:id="@+id/status_prev2_h"
android:scaleType="fitCenter"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:adjustViewBounds="true"
android:layout_height="match_parent"
tools:ignore="ContentDescription" />
@@ -336,18 +340,26 @@
android:layout_height="20dp"
tools:ignore="ContentDescription" />
</RelativeLayout>
+ </LinearLayout>
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:layout_marginTop="1dp"
+ android:baselineAligned="false">
<RelativeLayout
- android:layout_marginLeft="1dp"
- android:layout_marginStart="1dp"
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
+ android:layout_weight="1"
android:layout_height="match_parent"
>
<ImageView
android:id="@+id/status_prev3_h"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/status_prev3_play_h"
@@ -359,17 +371,18 @@
tools:ignore="ContentDescription" />
</RelativeLayout>
<RelativeLayout
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_height="match_parent"
android:layout_marginLeft="1dp"
android:layout_marginStart="1dp"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
>
<ImageView
android:id="@+id/status_prev4_h"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/status_prev4_play_h"
@@ -381,7 +394,7 @@
tools:ignore="ContentDescription" />
</RelativeLayout>
</LinearLayout>
- </HorizontalScrollView>
+ </LinearLayout>
<ImageView
android:id="@+id/hide_preview_h"
android:layout_alignParentStart="true"
diff --git a/app/src/main/res/layout/drawer_status_compact.xml b/app/src/main/res/layout/drawer_status_compact.xml
index a694e1976..ea49477ca 100644
--- a/app/src/main/res/layout/drawer_status_compact.xml
+++ b/app/src/main/res/layout/drawer_status_compact.xml
@@ -268,11 +268,12 @@
android:visibility="gone"
android:layout_marginTop="5dp"
android:layout_width="match_parent"
- android:layout_height="200dp">
+ android:layout_height="wrap_content">
- <HorizontalScrollView
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
>
<LinearLayout
android:layout_width="wrap_content"
@@ -280,14 +281,17 @@
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:orientation="horizontal"
- >
+ android:baselineAligned="false">
<RelativeLayout
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_marginLeft="1dp"
+ android:layout_marginStart="1dp"
android:layout_height="match_parent"
>
<ImageView
android:id="@+id/status_prev1_h"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:layout_height="match_parent"
@@ -302,7 +306,8 @@
tools:ignore="ContentDescription" />
</RelativeLayout>
<RelativeLayout
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
+ android:layout_weight="1"
android:layout_height="match_parent"
android:layout_marginLeft="1dp"
android:layout_marginStart="1dp"
@@ -310,7 +315,7 @@
<ImageView
android:id="@+id/status_prev2_h"
android:scaleType="fitCenter"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:adjustViewBounds="true"
android:layout_height="match_parent"
tools:ignore="ContentDescription" />
@@ -323,18 +328,28 @@
android:layout_height="20dp"
tools:ignore="ContentDescription" />
</RelativeLayout>
+ </LinearLayout>
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginTop="1dp"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:baselineAligned="false">
<RelativeLayout
+ android:layout_width="0dp"
+ android:layout_weight="1"
android:layout_marginLeft="1dp"
android:layout_marginStart="1dp"
- android:layout_width="wrap_content"
android:layout_height="match_parent"
>
<ImageView
android:id="@+id/status_prev3_h"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/status_prev3_play_h"
@@ -346,17 +361,18 @@
tools:ignore="ContentDescription" />
</RelativeLayout>
<RelativeLayout
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_height="match_parent"
android:layout_marginLeft="1dp"
android:layout_marginStart="1dp"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
>
<ImageView
android:id="@+id/status_prev4_h"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/status_prev4_play_h"
@@ -368,7 +384,7 @@
tools:ignore="ContentDescription" />
</RelativeLayout>
</LinearLayout>
- </HorizontalScrollView>
+ </LinearLayout>
<ImageView
android:id="@+id/hide_preview_h"
android:layout_alignParentStart="true"
diff --git a/app/src/main/res/layout/drawer_status_focused.xml b/app/src/main/res/layout/drawer_status_focused.xml
index 9e0b2bd76..3da041267 100644
--- a/app/src/main/res/layout/drawer_status_focused.xml
+++ b/app/src/main/res/layout/drawer_status_focused.xml
@@ -259,12 +259,14 @@
<RelativeLayout
android:id="@+id/status_horizontal_document_container"
android:visibility="gone"
+ android:layout_marginTop="5dp"
android:layout_width="match_parent"
- android:layout_height="200dp">
+ android:layout_height="wrap_content">
- <HorizontalScrollView
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
>
<LinearLayout
android:layout_width="wrap_content"
@@ -272,14 +274,15 @@
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:orientation="horizontal"
- >
+ android:baselineAligned="false">
<RelativeLayout
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
+ android:layout_weight="1"
android:layout_height="match_parent"
>
<ImageView
android:id="@+id/status_prev1_h"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:layout_height="match_parent"
@@ -294,7 +297,8 @@
tools:ignore="ContentDescription" />
</RelativeLayout>
<RelativeLayout
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
+ android:layout_weight="1"
android:layout_height="match_parent"
android:layout_marginLeft="1dp"
android:layout_marginStart="1dp"
@@ -302,7 +306,7 @@
<ImageView
android:id="@+id/status_prev2_h"
android:scaleType="fitCenter"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:adjustViewBounds="true"
android:layout_height="match_parent"
tools:ignore="ContentDescription" />
@@ -315,18 +319,26 @@
android:layout_height="20dp"
tools:ignore="ContentDescription" />
</RelativeLayout>
+ </LinearLayout>
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:layout_marginTop="1dp"
+ android:baselineAligned="false">
<RelativeLayout
- android:layout_marginLeft="1dp"
- android:layout_marginStart="1dp"
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
+ android:layout_weight="1"
android:layout_height="match_parent"
>
<ImageView
android:id="@+id/status_prev3_h"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/status_prev3_play_h"
@@ -338,17 +350,18 @@
tools:ignore="ContentDescription" />
</RelativeLayout>
<RelativeLayout
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_height="match_parent"
android:layout_marginLeft="1dp"
android:layout_marginStart="1dp"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
>
<ImageView
android:id="@+id/status_prev4_h"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/status_prev4_play_h"
@@ -360,7 +373,7 @@
tools:ignore="ContentDescription" />
</RelativeLayout>
</LinearLayout>
- </HorizontalScrollView>
+ </LinearLayout>
<ImageView
android:id="@+id/hide_preview_h"
android:layout_alignParentStart="true"