android-elevation

How to show the shadow of the ActionBar&Toolbar of the support library on all Android versions?

落爺英雄遲暮 提交于 2019-11-27 05:37:33
问题 This is a simple question: I use the new support library, which allows me to have a Toolbar instance and even set it as the actionBar of the activity (or use the default one). How do I customize the shadow being cast by the Toolbar (or the default ActionBar) ? I've tried to use "setElevation" (on both of them), but it didn't seem to do anything on Android Lollipop. Also, I can't find how to customize the shadow on pre-Lollipop versions. Is there maybe an API for this? or at least a drawable

Android “elevation” not showing a shadow

坚强是说给别人听的谎言 提交于 2019-11-26 01:48:18
问题 I have a ListView, and with each list item I want it to show a shadow beneath it. I am using Android Lollipop\'s new elevation feature to set a Z on the View that I want to cast a shadow, and am already doing this effectively with the ActionBar (technically a Toolbar in Lollipop). I am using Lollipop\'s elevation, but for some reason it isn\'t showing a shadow under the list items. Here is how each list item\'s layout is set up: <?xml version=\"1.0\" encoding=\"utf-8\"?> <RelativeLayout xmlns