question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding shadow to ActionButton in Android

See original GitHub issue

I 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:open
  • Created 6 years ago
  • Reactions:10
  • Comments:13

github_iconTop GitHub Comments

24reactions
tiendv89commented, Oct 24, 2017

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 the parentView of the main button.

Setting fixNativeFeedbackRadius = true on the component props temporarily enable the shadow.

11reactions
ishigamiicommented, Oct 17, 2018

Any update on this cause the shadow works perfectly on ios but on android just nothing.

Using fixNativeFeedbackRadius with postion={left} put the action button out of screen so it’s not a solution.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found