Android ActionBar与工具栏 [英] Android ActionBar vs ToolBar
本文介绍了Android ActionBar与工具栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您是否可以像使用旧的ActionBar一样使Android新的工具栏以阴影显示?
Can you make Android new Toolbar to be shown with shadow like you could do with the old ActionBar?
请参考图片:左边是ActionBar,您可以看到它带有阴影的浮动",而右边是ToolBar,又怎么能显示它呢?
Please refer to the image: Left is ActionBar and you can see it looks "floating" with shadow while the right one is ToolBar, how can you show it the same?
推荐答案
在工具栏上使用attibute android:elevetion = 4dp
.
Use attibute android:elevetion=4dp
on toolbar.
这篇关于Android ActionBar与工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文