[Android] [PATCH] Nicer 'save playlist' dialog
Geoffrey Métais
geoffrey.metais at gmail.com
Wed Dec 30 01:23:23 CET 2015
---
vlc-android/res/layout/dialog_playlist.xml | 16 ++++++++++++++--
.../org/videolan/vlc/gui/dialogs/SavePlaylistDialog.java | 4 +++-
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/vlc-android/res/layout/dialog_playlist.xml b/vlc-android/res/layout/dialog_playlist.xml
index 17e3cdc..b329561 100644
--- a/vlc-android/res/layout/dialog_playlist.xml
+++ b/vlc-android/res/layout/dialog_playlist.xml
@@ -7,6 +7,7 @@
android:id="@+id/dialog_playlist_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginTop="10dp"
android:hint="@string/playlist_name_hint">
<EditText
android:layout_width="match_parent"
@@ -20,6 +21,7 @@
android:id="@+id/dialog_list_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginTop="10dp"
android:layout_below="@+id/dialog_playlist_name">
<ListView
android:id="@android:id/list"
@@ -32,10 +34,20 @@
android:text="@string/noplaylist"/>
</FrameLayout>
<Button
+ android:id="@+id/dialog_playlist_cancel"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@android:string/cancel"
+ android:layout_below="@id/dialog_list_container"
+ android:layout_toLeftOf="@+id/dialog_playlist_save"
+ tools:targetApi="11"
+ style="?android:attr/borderlessButtonStyle"/>
+ <Button
android:id="@+id/dialog_playlist_save"
- android:layout_width="match_parent"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/playlist_save"
+ android:layout_alignParentRight="true"
+ android:text="@android:string/ok"
android:layout_below="@id/dialog_list_container"
tools:targetApi="11"
style="?android:attr/borderlessButtonStyle"/>
diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.java b/vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.java
index 78e9639..c169cdc 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.java
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.java
@@ -76,7 +76,9 @@ public class SavePlaylistDialog extends DialogFragment implements AdapterView.On
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
- return new AppCompatDialog(getActivity(), getTheme());
+ AppCompatDialog dialog = new AppCompatDialog(getActivity(), getTheme());
+ dialog.setTitle(R.string.playlist_save);
+ return dialog;
}
--
2.5.0
More information about the Android
mailing list