[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.
This commit is contained in:
Saúl Ibarra Corretgé 2017-04-10 11:26:06 +02:00 committed by Lyubo Marinov
parent 50fea44ce2
commit 14d394aed8
1 changed files with 5 additions and 1 deletions

View File

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