Elevation on Android Lollipop not working -



Elevation on Android Lollipop not working -

i trying create utilize of elevation property in latest android lollipop preview release. set targetsdk 21 , theme material. next added background shape textview , set elevation 8dp textview not showing signs of shadow. on nexus7 running lollipop preview. there else have consider?

here layout:

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/rect" android:text="hallo world" android:padding="8dp" android:elevation="8dp" /> </linearlayout>

this background drawable:

<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#7d0073ff" /> <corners android:radius="16dp" /> </shape>

here textview:

for reason if set solid color transparency, elevation shadow not show up.

in example, changed #7d0073ff #0073ff , got shadow.

this bug, in documentation gives similar illustration using translucent background color.

android android-5.0-lollipop

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -