From 82e0ef78d87e7e70f82213dcf78d1f86c61a2ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sondre=20M=C3=A6re=20Overskaug?= Date: Tue, 21 Nov 2017 19:59:55 +0100 Subject: [PATCH] fix(virtualizedlist): fix inverted lists not showing up on Android 7 on Huawei phones --- Libraries/Lists/VirtualizedList.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index 0638a6b208870a..2d218d0962d5f3 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -22,6 +22,7 @@ const ScrollView = require('ScrollView'); const StyleSheet = require('StyleSheet'); const View = require('View'); const ViewabilityHelper = require('ViewabilityHelper'); +const Platform = require('Platform'); const flattenStyle = require('flattenStyle'); const infoLog = require('infoLog'); @@ -1245,12 +1246,22 @@ class CellRenderer extends React.Component { } const styles = StyleSheet.create({ - verticallyInverted: { - transform: [{scaleY: -1}], - }, - horizontallyInverted: { - transform: [{scaleX: -1}], - }, + verticallyInverted: Platform.select({ + android: { + scaleY: -1, + }, + ios: { + transform: [{scaleY: -1}], + }, + }), + horizontallyInverted: Platform.select({ + android: { + scaleX: -1, + }, + ios: { + transform: [{scaleX: -1}], + }, + }), }); module.exports = VirtualizedList;