[Android] Fix PopuLayout view editor mode
Nicolas Pomepuy
git at videolan.org
Tue Nov 2 13:00:51 UTC 2021
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Sep 27 15:03:18 2021 +0200| [bf31e2f408c5e54e833173586d7ced8345c7dc05] | committer: Nicolas Pomepuy
Fix PopuLayout view editor mode
> https://code.videolan.org/videolan/vlc-android/commit/bf31e2f408c5e54e833173586d7ced8345c7dc05
---
application/vlc-android/src/org/videolan/vlc/gui/view/PopupLayout.kt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/view/PopupLayout.kt b/application/vlc-android/src/org/videolan/vlc/gui/view/PopupLayout.kt
index 2ca6943e1..aa01c280e 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/view/PopupLayout.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/view/PopupLayout.kt
@@ -125,7 +125,9 @@ class PopupLayout : ConstraintLayout, ScaleGestureDetector.OnScaleGestureListene
scaleGestureDetector = ScaleGestureDetector(context, this)
setOnTouchListener(this)
windowManager!!.addView(this, params)
- mLayoutParams = layoutParams as WindowManager.LayoutParams
+ if (!isInEditMode) {
+ mLayoutParams = layoutParams as WindowManager.LayoutParams
+ }
updateWindowSize()
}
More information about the Android
mailing list