8

Today I developed my first Android L Apps, and read through the d.android.com/preview tips. They said that android:elevation would show me shadows. But look at this:

<TextView
    android:id="@+id/tvTest5"
    android:layout_width="50dp"
    android:layout_height="50dp"
    android:layout_below="@id/btnTest1"
    android:layout_toRightOf="@id/tvTest4"
    android:layout_marginLeft="10dp"
    android:background="#000000"
    android:elevation="50dp"/>

I don't see any shadow in my Emulator. Am I doing something wrong or is the Emulator buggy? I'm using Android Studio

rnrneverdies
  • 13,347
  • 9
  • 57
  • 89
humbug
  • 333
  • 5
  • 11

3 Answers3

1

I kinda solved it. The problem was the emulator. We now have ordered a Nexus 5 and flashed Android L. Now it works fine

humbug
  • 333
  • 5
  • 11
0

You should see the elevation when you create two views with different z-index.

Amitabh
  • 144
  • 9
0

You should watch the video talking about it:

Google I/O 2014 - Material science: Developing Android applications with material

They said there that elevation has weird issues if the Z value isn't different between views.

It starts at about 15:00 .

android developer
  • 106,412
  • 122
  • 641
  • 1,128