[Android] Improve MRL dialog appearence
Geoffrey Métais
git at videolan.org
Thu Jan 10 19:02:39 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jan 10 16:57:08 2019 +0100| [47abcc7f754a45092f3a91320c9706af16a63ab8] | committer: Geoffrey Métais
Improve MRL dialog appearence
> https://code.videolan.org/videolan/vlc-android/commit/47abcc7f754a45092f3a91320c9706af16a63ab8
---
vlc-android/res/layout-v21/mrl_panel.xml | 18 +++++++++++-------
vlc-android/res/layout/mrl_panel.xml | 12 +++++++-----
.../org/videolan/vlc/gui/network/MRLPanelFragment.kt | 2 +-
3 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/vlc-android/res/layout-v21/mrl_panel.xml b/vlc-android/res/layout-v21/mrl_panel.xml
index 38279cc99..f308e024e 100644
--- a/vlc-android/res/layout-v21/mrl_panel.xml
+++ b/vlc-android/res/layout-v21/mrl_panel.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:app="http://schemas.android.com/apk/res-auto"
+<layout xmlns:tools="http://schemas.android.com/tools"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable name="viewmodel"
@@ -16,7 +17,8 @@
android:layout_height="wrap_content"
android:background="?attr/background_default_darker"
android:layoutDirection="ltr"
- android:padding="16dp"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
android:minWidth="@dimen/mrl_panel_min_width">
<com.google.android.material.textfield.TextInputLayout
@@ -24,12 +26,11 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dip"
- android:layout_marginEnd="4dp"
- android:layout_marginRight="4dp"
+ android:paddingEnd="4dp"
app:layout_constraintEnd_toStartOf="@+id/play"
- app:layout_constraintRight_toLeftOf="@+id/play"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent">
+ app:layout_constraintTop_toTopOf="parent"
+ tools:ignore="RtlSymmetry">
<!--android:paddingTop ==> Space between cursor and top hint-->
<!--android:paddingBottom ==> Space between cursor and bottom border-->
@@ -37,7 +38,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
- android:layout_marginRight="8dp"
+ android:layout_marginStart="8dp"
android:background="@drawable/edittext_bottom_border"
android:hint="@string/open_mrl_dialog_msg"
android:imeOptions="actionGo"
@@ -54,6 +55,7 @@
android:id="@+id/play"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginEnd="4dp"
android:contentDescription="@string/play_button"
android:scaleType="center"
android:src="@drawable/ic_send"
@@ -67,6 +69,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
+ android:layout_marginStart="4dp"
+ android:layout_marginEnd="4dp"
android:background="?attr/background_default"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
diff --git a/vlc-android/res/layout/mrl_panel.xml b/vlc-android/res/layout/mrl_panel.xml
index ae2cabcd6..ad32771fc 100644
--- a/vlc-android/res/layout/mrl_panel.xml
+++ b/vlc-android/res/layout/mrl_panel.xml
@@ -16,7 +16,8 @@
android:layout_height="wrap_content"
android:background="?attr/background_default_darker"
android:layoutDirection="ltr"
- android:padding="16dp"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
android:minWidth="@dimen/mrl_panel_min_width">
<com.google.android.material.textfield.TextInputLayout
@@ -24,10 +25,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dip"
- android:layout_marginEnd="4dp"
- android:layout_marginRight="4dp"
+ android:paddingEnd="4dp"
app:layout_constraintEnd_toStartOf="@+id/play"
- app:layout_constraintRight_toLeftOf="@+id/play"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
@@ -37,7 +36,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
- android:layout_marginRight="8dp"
+ android:layout_marginStart="8dp"
android:hint="@string/open_mrl_dialog_msg"
android:imeOptions="actionGo"
android:inputType="textUri"
@@ -52,6 +51,7 @@
android:id="@+id/play"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginEnd="4dp"
android:contentDescription="@string/play_button"
android:scaleType="center"
android:src="@drawable/ic_send"
@@ -65,6 +65,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
+ android:layout_marginEnd="4dp"
+ android:layout_marginStart="4dp"
android:background="?attr/background_default"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
diff --git a/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt b/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
index 4bb0787d1..004eda53f 100644
--- a/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
@@ -69,7 +69,7 @@ class MRLPanelFragment : androidx.fragment.app.DialogFragment(), View.OnKeyListe
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- setStyle(androidx.fragment.app.DialogFragment.STYLE_NO_FRAME, 0)
+ setStyle(androidx.fragment.app.DialogFragment.STYLE_NORMAL, 0)
viewModel = ViewModelProviders.of(this).get(StreamsModel::class.java)
}
More information about the Android
mailing list