Skip to content

Commit d44f3a0

Browse files
joshuapintergitim
authored andcommitted
Corrected padding to allow for Android’s elevation dropshadows to not get cut off.
1 parent 00f0374 commit d44f3a0

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

examples/Basic/index.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,16 @@ const styles = StyleSheet.create({
159159

160160
contentContainer: {
161161
width: window.width,
162-
paddingHorizontal: 30,
162+
163+
...Platform.select({
164+
ios: {
165+
paddingHorizontal: 30,
166+
},
167+
168+
android: {
169+
paddingHorizontal: 20,
170+
}
171+
})
163172
},
164173

165174
row: {
@@ -171,20 +180,21 @@ const styles = StyleSheet.create({
171180
flex: 1,
172181
marginVertical: 5,
173182
borderRadius: 4,
174-
width: window.width - 30 * 2,
183+
175184

176185
...Platform.select({
177186
ios: {
187+
width: window.width - 30 * 2,
178188
shadowColor: 'rgba(0,0,0,0.2)',
179189
shadowOpacity: 1,
180190
shadowOffset: {height: 2, width: 2},
181191
shadowRadius: 2,
182192
},
183193

184194
android: {
195+
width: window.width - 25 * 2,
185196
elevation: 2,
186-
// marginHorizontal: 10,
187-
// borderColor: '#e5e5e5',
197+
marginHorizontal: 5,
188198
},
189199
})
190200
},

0 commit comments

Comments
 (0)