Skip to content

Commit 82e0ef7

Browse files
committed
fix(virtualizedlist): fix inverted lists not showing up on Android 7 on Huawei phones
1 parent 6ce4244 commit 82e0ef7

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

Libraries/Lists/VirtualizedList.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const ScrollView = require('ScrollView');
2222
const StyleSheet = require('StyleSheet');
2323
const View = require('View');
2424
const ViewabilityHelper = require('ViewabilityHelper');
25+
const Platform = require('Platform');
2526

2627
const flattenStyle = require('flattenStyle');
2728
const infoLog = require('infoLog');
@@ -1245,12 +1246,22 @@ class CellRenderer extends React.Component {
12451246
}
12461247

12471248
const styles = StyleSheet.create({
1248-
verticallyInverted: {
1249-
transform: [{scaleY: -1}],
1250-
},
1251-
horizontallyInverted: {
1252-
transform: [{scaleX: -1}],
1253-
},
1249+
verticallyInverted: Platform.select({
1250+
android: {
1251+
scaleY: -1,
1252+
},
1253+
ios: {
1254+
transform: [{scaleY: -1}],
1255+
},
1256+
}),
1257+
horizontallyInverted: Platform.select({
1258+
android: {
1259+
scaleX: -1,
1260+
},
1261+
ios: {
1262+
transform: [{scaleX: -1}],
1263+
},
1264+
}),
12541265
});
12551266

12561267
module.exports = VirtualizedList;

0 commit comments

Comments
 (0)