[Android] Invert actions position in question dialog
Geoffrey Métais
git at videolan.org
Tue Jul 5 17:36:10 CEST 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jul 5 17:34:32 2016 +0200| [248853cc142fd124edd6489739b7cc6a1e3138dc] | committer: Geoffrey Métais
Invert actions position in question dialog
Thsi fixes the visibility of 'abort' button
> https://code.videolan.org/videolan/vlc-android/commit/248853cc142fd124edd6489739b7cc6a1e3138dc
---
vlc-android/res/layout/vlc_question_dialog.xml | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/vlc-android/res/layout/vlc_question_dialog.xml b/vlc-android/res/layout/vlc_question_dialog.xml
index 2b3bb41..caf6998 100644
--- a/vlc-android/res/layout/vlc_question_dialog.xml
+++ b/vlc-android/res/layout/vlc_question_dialog.xml
@@ -25,31 +25,31 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/text"
- android:text="@android:string/cancel"
- android:layout_toLeftOf="@+id/action1"
+ android:text="@{TextUtils.isEmpty(dialog.cancelText) ? @android:string/cancel : dialog.cancelText}"
+ android:layout_toLeftOf="@+id/action2"
android:onClick="@{handler::onCancel}"
tools:targetApi="11"
style="?android:attr/borderlessButtonStyle" />
<Button
- android:id="@+id/action1"
+ android:id="@+id/action2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_toLeftOf="@+id/action2"
android:layout_below="@+id/text"
- android:text="@{dialog.action1Text}"
- android:visibility="@{TextUtils.isEmpty(dialog.action1Text) ? View.GONE : View.VISIBLE}"
- android:onClick="@{handler::onAction1}"
+ android:layout_toLeftOf="@+id/action1"
+ android:text="@{dialog.action2Text}"
+ android:visibility="@{TextUtils.isEmpty(dialog.action2Text) ? View.GONE : View.VISIBLE}"
+ android:onClick="@{handler::onAction2}"
tools:targetApi="11"
style="?android:attr/borderlessButtonStyle" />
<Button
- android:id="@+id/action2"
+ android:id="@+id/action1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/text"
- android:text="@{dialog.action2Text}"
- android:visibility="@{TextUtils.isEmpty(dialog.action2Text) ? View.GONE : View.VISIBLE}"
- android:onClick="@{handler::onAction2}"
+ android:text="@{dialog.action1Text}"
+ android:visibility="@{TextUtils.isEmpty(dialog.action1Text) ? View.GONE : View.VISIBLE}"
+ android:onClick="@{handler::onAction1}"
tools:targetApi="11"
style="?android:attr/borderlessButtonStyle" />
</RelativeLayout>
More information about the Android
mailing list