[Android] Improve context menu appearence

Geoffrey Métais git at videolan.org
Thu Jun 7 13:49:57 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jun  7 13:49:26 2018 +0200| [4b7e3bf91941b3df75dfe4ae809bfee398940df9] | committer: Geoffrey Métais

Improve context menu appearence

> https://code.videolan.org/videolan/vlc-android/commit/4b7e3bf91941b3df75dfe4ae809bfee398940df9
---

 vlc-android/res/layout/contextual_sheet.xml                  | 4 ++--
 vlc-android/res/values-w800dp/dimens.xml                     | 1 +
 vlc-android/res/values/dimens.xml                            | 1 +
 vlc-android/src/org/videolan/vlc/gui/dialogs/ContextSheet.kt | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/vlc-android/res/layout/contextual_sheet.xml b/vlc-android/res/layout/contextual_sheet.xml
index 1172146db..165d02675 100644
--- a/vlc-android/res/layout/contextual_sheet.xml
+++ b/vlc-android/res/layout/contextual_sheet.xml
@@ -10,8 +10,8 @@
         android:layout_height="wrap_content"
         android:layout_width="match_parent"
         style="@style/VLC.TextViewTitle"
-        android:gravity="center_horizontal"
-        android:layout_margin="8dp"/>
+        android:textColor="@color/orange800"
+        android:layout_margin="@dimen/default_margin"/>
     <android.support.v7.widget.RecyclerView
         android:id="@+id/ctx_list"
         android:layout_height="wrap_content"
diff --git a/vlc-android/res/values-w800dp/dimens.xml b/vlc-android/res/values-w800dp/dimens.xml
index 126f9f28f..a2a89ed1b 100644
--- a/vlc-android/res/values-w800dp/dimens.xml
+++ b/vlc-android/res/values-w800dp/dimens.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
     <dimen name="default_content_width">800dp</dimen>
+    <dimen name="default_context_width">600dp</dimen>
     <dimen name="file_picker_width">720dp</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 7a29a497f..191bd3b9d 100644
--- a/vlc-android/res/values/dimens.xml
+++ b/vlc-android/res/values/dimens.xml
@@ -46,6 +46,7 @@
     <dimen name="file_picker_height">-1px</dimen>
 
     <dimen name="default_content_width">-1px</dimen>
+    <dimen name="default_context_width">-1px</dimen>
 
 
     <!-- Default -->
diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/ContextSheet.kt b/vlc-android/src/org/videolan/vlc/gui/dialogs/ContextSheet.kt
index e1816ed8f..8aecfa74a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/ContextSheet.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/ContextSheet.kt
@@ -76,7 +76,7 @@ class ContextSheet : BottomSheetDialogFragment() {
         list.adapter = ContextAdapter()
         val flags = arguments?.getInt(CTX_FLAGS_KEY) ?: 0
         options = populateOptions(flags)
-        if (!AndroidDevices.isPhone) launch(UI) { dialog.window.setLayout(resources.getDimensionPixelSize(R.dimen.default_content_width), ViewGroup.LayoutParams.MATCH_PARENT) }
+        if (!AndroidDevices.isPhone) launch(UI) { dialog.window.setLayout(resources.getDimensionPixelSize(R.dimen.default_context_width), ViewGroup.LayoutParams.MATCH_PARENT) }
     }
 
     private fun populateOptions(flags: Int) = mutableListOf<CtxOption>().apply {



More information about the Android mailing list