aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-10-06 22:16:04 +0200
committerChristian Schneppe <christian@pix-art.de>2017-10-06 22:16:04 +0200
commit97033b52339e49fc8bd3b655cd5bc37a24115f90 (patch)
tree979369ddedc30c5d674b61e6402c3b92fcdc39a3 /src
parent61c3a688a9f267fc5786084bf3cf6805d3491eb7 (diff)
limit audio player width on small screens
Diffstat (limited to '')
-rw-r--r--src/main/res/layout/message_content.xml2
-rw-r--r--src/main/res/values-w384dp/dimens.xml7
-rw-r--r--src/main/res/values/dimens.xml1
3 files changed, 8 insertions, 2 deletions
diff --git a/src/main/res/layout/message_content.xml b/src/main/res/layout/message_content.xml
index bb9370313..d2bcb0405 100644
--- a/src/main/res/layout/message_content.xml
+++ b/src/main/res/layout/message_content.xml
@@ -38,7 +38,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto">
<RelativeLayout
android:id="@+id/audio_player"
- android:layout_width="288dp"
+ android:layout_width="@dimen/audio_player_width"
android:layout_height="wrap_content"
android:visibility="gone"
>
diff --git a/src/main/res/values-w384dp/dimens.xml b/src/main/res/values-w384dp/dimens.xml
index 7abc06d3b..c33c11232 100644
--- a/src/main/res/values-w384dp/dimens.xml
+++ b/src/main/res/values-w384dp/dimens.xml
@@ -1 +1,6 @@
-<resources></resources>
+<resources>
+ <!-- 384dp is the screen width of the Nexus 4. Something like a Moto G is smaller but a Nexus 5X is larger -->
+ <!-- https://material.io/devices/ -->
+ <dimen name="fineprint_size">12sp</dimen>
+ <dimen name="audio_player_width">288dp</dimen>
+</resources> \ No newline at end of file
diff --git a/src/main/res/values/dimens.xml b/src/main/res/values/dimens.xml
index 9ef329aa8..cb103131a 100644
--- a/src/main/res/values/dimens.xml
+++ b/src/main/res/values/dimens.xml
@@ -5,4 +5,5 @@
<dimen name="infocard_padding">16dp</dimen>
<dimen name="image_button_padding">8dp</dimen>
<dimen name="elv_touch_slop">64dp</dimen>
+ <dimen name="audio_player_width">224dp</dimen>
</resources>