From 2094b15432383c00380b5c471b3764651255d927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 20 Jul 2017 15:05:18 +0200 Subject: [PATCH] [RN] Workaround for Android view clipping In another installment of "how on earth?!", using a 1px border instead of a 0.2px border fixes view clipping on a device where it didn't work before (Moto X Play). Observations: - When nothing was rendered, rotating the device made the buttons show up, this makes me think the Surface is not properly composited with the toolbar view for some reason. Why this happens in some devices and not in others remains a mistery. Other approaches attempted: - Setting View.collapsed to false so it will remain in the view hierarchy. It made no effect. - Setting View.needsOffscreenAlphaCompositing to true. It made no effect. Just like before, I came up with this workaround by accident, but couldn't find another way, so here we go again. --- react/features/base/styles/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/features/base/styles/functions.js b/react/features/base/styles/functions.js index 7bf5428250..902bf87d08 100644 --- a/react/features/base/styles/functions.js +++ b/react/features/base/styles/functions.js @@ -56,7 +56,7 @@ export function createStyleSheet(styles: StyleSheet, overrides: StyleSheet = {}) export function fixAndroidViewClipping(styles: T): T { if (Platform.OS === 'android') { styles.borderColor = ColorPalette.appBackground; - styles.borderWidth = 0.2; + styles.borderWidth = 1; } return styles;