[Android] Compact audio list on small screens
Geoffrey Métais
git at videolan.org
Wed Jan 23 11:35:24 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jan 22 17:57:48 2019 +0100| [db21604f16a8136f134204de4afdfebf9fdfbc34] | committer: Geoffrey Métais
Compact audio list on small screens
> https://code.videolan.org/videolan/vlc-android/commit/db21604f16a8136f134204de4afdfebf9fdfbc34
---
vlc-android/res/layout/audio_browser_item.xml | 11 +++++------
vlc-android/res/values-h480dp/dimens.xml | 4 ++++
vlc-android/res/values/dimens.xml | 9 +++++++--
vlc-android/res/values/styles.xml | 2 +-
4 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/vlc-android/res/layout/audio_browser_item.xml b/vlc-android/res/layout/audio_browser_item.xml
index d65edfada..fde90383b 100644
--- a/vlc-android/res/layout/audio_browser_item.xml
+++ b/vlc-android/res/layout/audio_browser_item.xml
@@ -29,7 +29,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/audio_browser_item_size"
- android:paddingBottom="8dp"
+ android:paddingBottom="@dimen/audio_item_padding_botom"
android:longClickable="true"
android:clickable="true"
android:focusable="true"
@@ -40,10 +40,10 @@
android:id="@+id/section_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingLeft="24dp"
- android:paddingTop="8dp"
- android:paddingRight="28dp"
- android:paddingBottom="8dp"
+ android:paddingStart="24dp"
+ android:paddingTop="@dimen/audio_item_header_padding"
+ android:paddingEnd="28dp"
+ android:paddingBottom="@dimen/audio_item_header_padding"
vlc:layout_constraintTop_toTopOf="parent"
android:singleLine="true"
android:text="@{header}"
@@ -62,7 +62,6 @@
vlc:layout_constraintTop_toBottomOf="@+id/section_header"
vlc:layout_constraintStart_toStartOf="parent"
vlc:layout_constraintBottom_toBottomOf="parent"
- android:layout_marginTop="8dp"
android:layout_gravity="center"
vlc:media="@{item}"
android:background="@{cover}"
diff --git a/vlc-android/res/values-h480dp/dimens.xml b/vlc-android/res/values-h480dp/dimens.xml
index b8599eb1b..ab9fe3993 100644
--- a/vlc-android/res/values-h480dp/dimens.xml
+++ b/vlc-android/res/values-h480dp/dimens.xml
@@ -5,4 +5,8 @@
<dimen name="subs_dl_dialog_height">350dp</dimen>
<dimen name="toolbar_height">40dp</dimen>
<dimen name="tab_layout_height">32dp</dimen>
+ <dimen name="audio_item_header_padding">8dp</dimen>
+ <dimen name="audio_item_padding_botom">8dp</dimen>
+ <dimen name="audio_browser_item_size">48dp</dimen>
+ <dimen name="audio_item_title_size">16sp</dimen>
</resources>
\ No newline at end of file
diff --git a/vlc-android/res/values/dimens.xml b/vlc-android/res/values/dimens.xml
index c6584e710..3e04e4d65 100644
--- a/vlc-android/res/values/dimens.xml
+++ b/vlc-android/res/values/dimens.xml
@@ -1,7 +1,6 @@
<resources>
<dimen name="shadow_width">6px</dimen>
<dimen name="widget_margin">0dp</dimen>
- <dimen name="audio_browser_item_size">48dp</dimen>
<dimen name="directory_browser_item_size">40dp</dimen>
<dimen name="listview_bottom_padding">8dp</dimen>
<dimen name="listview_side_padding">4dp</dimen>
@@ -89,4 +88,10 @@
<dimen name="audio_player_seekbar_bottom_margin">16dp</dimen>
<dimen name="toolbar_height">40dp</dimen>
<dimen name="tab_layout_height">24dp</dimen>
-</resources>
\ No newline at end of file
+
+ <!-- Audio items -->
+ <dimen name="audio_browser_item_size">40dp</dimen>
+ <dimen name="audio_item_header_padding">4dp</dimen>
+ <dimen name="audio_item_padding_botom">4dp</dimen>
+ <dimen name="audio_item_title_size">14sp</dimen>
+</resources>
diff --git a/vlc-android/res/values/styles.xml b/vlc-android/res/values/styles.xml
index 7a9f554fe..5888b7791 100644
--- a/vlc-android/res/values/styles.xml
+++ b/vlc-android/res/values/styles.xml
@@ -319,7 +319,7 @@
</style>
<style name="VLC.TextViewTitle" parent="VLC.TextView">
- <item name="android:textSize">16sp</item>
+ <item name="android:textSize">@dimen/audio_item_title_size</item>
<item name="android:textColor">?attr/list_title</item>
<item name="android:maxLines">2</item>
<item name="android:lineSpacingMultiplier">1.1</item>
More information about the Android
mailing list