Skip to content

Commit bf20edb

Browse files
authored
fix(animated-fab): correct Android shadow/content stacking (#4903)
1 parent 16a69a7 commit bf20edb

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/components/FAB/AnimatedFAB.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ export type Props = $Omit<$RemoveChildren<typeof Surface>, 'mode'> & {
130130

131131
const SIZE = 56;
132132
const SCALE = 0.9;
133+
const SHADOW_LAYER_Z_INDEX = 1;
134+
const CONTENT_LAYER_Z_INDEX = 2;
133135

134136
/**
135137
* An animated, extending horizontally floating action button represents the primary action in an application.
@@ -596,9 +598,19 @@ const styles = StyleSheet.create({
596598
innerWrapper: {
597599
flexDirection: 'row',
598600
overflow: 'hidden',
601+
...Platform.select({
602+
android: {
603+
zIndex: CONTENT_LAYER_Z_INDEX,
604+
},
605+
}),
599606
},
600607
shadowWrapper: {
601608
elevation: 0,
609+
...Platform.select({
610+
android: {
611+
zIndex: SHADOW_LAYER_Z_INDEX,
612+
},
613+
}),
602614
},
603615
shadow: {
604616
elevation: 6,

0 commit comments

Comments
 (0)