I want to use an elevation in a custom layout element and I want to set in XML the value of that element using the default action bar elevation value. I can\'t find a way to get
The default elevation of the action bar is 4dp. I did a little experiment by creating one custom view right below the action bar and set its elevation to 4dp. So, both were looking the same. Official documentation also mentioned 4dp standard elevation for the action bar.
- Nav drawer: 16dp
- App bar: 4dp
- Card: 1dp to 8dp
- FAB: 6dp
- Button: 2dp to 8dp
- Dialog: 24dp
Here App bar refers to Action bar.
Reference: Elevation