Ver código fonte

[RN] Add workaround for broken border radius on Android

For images < 80 of size forder radius doesn't work properly (it looks like a
square with rounded corders), however, using a duble sized radius does the
trick. Go figure.
j8
Saúl Ibarra Corretgé 8 anos atrás
pai
commit
14d394aed8
1 arquivos alterados com 5 adições e 1 exclusões
  1. 5
    1
      react/features/filmstrip/components/styles.js

+ 5
- 1
react/features/filmstrip/components/styles.js Ver arquivo

@@ -1,3 +1,4 @@
1
+import { Platform } from '../../base/react';
1 2
 import { BoxModel, ColorPalette } from '../../base/styles';
2 3
 
3 4
 /**
@@ -9,7 +10,10 @@ export const styles = {
9 10
      */
10 11
     avatar: {
11 12
         alignSelf: 'center',
12
-        borderRadius: 25,
13
+
14
+        // XXX Workaround for Android: for images < 80 the border radius doesn't
15
+        // work properly, but applying a radius twice as big does the trick.
16
+        borderRadius: Platform.OS === 'android' ? 100 : 25,
13 17
         flex: 0,
14 18
         height: 50,
15 19
         width: 50

Carregando…
Cancelar
Salvar