Default action bar elevation

前端 未结 4 591
太阳男子
太阳男子 2021-01-31 02:22

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

4条回答
  •  滥情空心
    2021-01-31 03:05

    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.

    1. Nav drawer: 16dp
    2. App bar: 4dp
    3. Card: 1dp to 8dp
    4. FAB: 6dp
    5. Button: 2dp to 8dp
    6. Dialog: 24dp

    Here App bar refers to Action bar.

    Reference: Elevation

提交回复
热议问题