[Android] Fix DialogActivity appearing opaque

Geoffrey Métais git at videolan.org
Wed Dec 12 11:45:33 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec 12 11:22:28 2018 +0100| [3348d11968198b500689e75969ce3b8997397cc5] | committer: Geoffrey Métais

Fix DialogActivity appearing opaque

> https://code.videolan.org/videolan/vlc-android/commit/3348d11968198b500689e75969ce3b8997397cc5
---

 vlc-android/res/drawable/rounded_corners_grey.xml        | 12 ++++++++++++
 vlc-android/res/layout/dialog_ext_device.xml             |  3 ++-
 vlc-android/src/org/videolan/vlc/gui/DialogActivity.java |  1 +
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/vlc-android/res/drawable/rounded_corners_grey.xml b/vlc-android/res/drawable/rounded_corners_grey.xml
new file mode 100644
index 000000000..537d8d856
--- /dev/null
+++ b/vlc-android/res/drawable/rounded_corners_grey.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <solid
+        android:color="@color/grey850" >
+    </solid>
+    <corners
+        android:radius="3dp"   >
+    </corners>
+
+</shape>
\ No newline at end of file
diff --git a/vlc-android/res/layout/dialog_ext_device.xml b/vlc-android/res/layout/dialog_ext_device.xml
index c83ad55b5..885a3310a 100644
--- a/vlc-android/res/layout/dialog_ext_device.xml
+++ b/vlc-android/res/layout/dialog_ext_device.xml
@@ -9,7 +9,8 @@
 
     <androidx.constraintlayout.widget.ConstraintLayout
         android:layout_width="match_parent"
-        android:layout_height="wrap_content">
+        android:layout_height="wrap_content"
+        android:background="@drawable/rounded_corners_grey">
 
         <TextView
             android:id="@+id/ext_device_summary"
diff --git a/vlc-android/src/org/videolan/vlc/gui/DialogActivity.java b/vlc-android/src/org/videolan/vlc/gui/DialogActivity.java
index 56448dd24..9c3f1004a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/DialogActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/DialogActivity.java
@@ -76,6 +76,7 @@ public class DialogActivity extends BaseActivity {
     }
 
     private void setupDeviceDialog() {
+        getWindow().getDecorView().setAlpha(0.f);
         final DeviceDialog dialog = new DeviceDialog();
         final Intent intent = getIntent();
         dialog.setDevice(intent.getStringExtra(EXTRA_PATH), intent.getStringExtra(EXTRA_UUID), intent.getBooleanExtra(EXTRA_SCAN, false));



More information about the Android mailing list