Adding shadow to ActionButton in Android
See original GitHub issueI have huge problem with adding shadow to the ActionButton, even if ShadowHide is false, there is no shadow under the button, i tried to add style to param ShadowStyle, but this isn’t working. Could you help me ?
My ActionButton definition:
<ActionButton
buttonColor={variables.brandDanger}
size={55}
position="left"
icon={
<Icon
name="ios-information-circle-outline"
style={{ fontSize: 25 }}
/>
}
shadowStyle={{
shadowColor: "#000000",
shadowOpacity: 0.8,
shadowRadius: 2,
shadowOffset: {
height: 1,
width: 0
}
}}
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:13
Top Results From Across the Web
How to add shadow to the FAB provided with the android ...
The following code does not render shadow below the Floating Action Button. What can be done to render shadow? Is this feature really...
Read more >FAB – Material Design 3
Floating action buttons (FABs) help people take primary actions. They're used to represent the most important action on a screen, such as Create...
Read more >FloatingActionButtonElevation - Android Developers
Represents the elevation for a floating action button in different states. See FloatingActionButtonDefaults.elevation for the default elevation used in a ...
Read more >Android Floating Action Button Example Tutorial - DigitalOcean
This is evident from the android:src attribute defined. In the above xml layout elevation attribute is used to cast a shadow over the...
Read more >How to Remove Shadow of Floating Action Button in Android?
To remove shadow of Floating Action Button in Kotlin Android, set the elevation attribute (in layout file) to 0dp or set compatElevation parameter...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There was a commit (3d9be2c9bda84ebe8261487d898a12c4bf2add95) the breaks the shadow on Android. I couldn’t have time to understand why but I notice that the
fixNativeFeedbackRadius
change the style on theparentView
of the main button.Setting
fixNativeFeedbackRadius = true
on the component props temporarily enable the shadow.Any update on this cause the shadow works perfectly on ios but on android just nothing.
Using
fixNativeFeedbackRadius
withpostion={left}
put the action button out of screen so it’s not a solution.