From 2281060ce3124fc4a25f6d5723bfbe6391157b9f Mon Sep 17 00:00:00 2001 From: taha Hichri Date: Wed, 18 Aug 2021 11:12:11 +0200 Subject: [PATCH] + explicit setSwipeToDismiss call to prevent display bug on wearables. --- .../java/com/huawei/codelab/component/SelectDeviceDialog.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RemoteInputDemo/entry/src/main/java/com/huawei/codelab/component/SelectDeviceDialog.java b/RemoteInputDemo/entry/src/main/java/com/huawei/codelab/component/SelectDeviceDialog.java index 50987f1..f2074f3 100644 --- a/RemoteInputDemo/entry/src/main/java/com/huawei/codelab/component/SelectDeviceDialog.java +++ b/RemoteInputDemo/entry/src/main/java/com/huawei/codelab/component/SelectDeviceDialog.java @@ -105,5 +105,9 @@ private void initView(Context context, List devices, SelectResultLis */ public void show() { commonDialog.show(); + + // Call this to prevent the dialog from being draggable on wearables which causes the UI to be unresponsive + // setSwipeToDismiss should to be called after calling the display method ".show()" + commonDialog.setSwipeToDismiss(false); } }