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
  • 15,243
  • 9
  • 65
  • 95
Niklas Siefke
  • 343
  • 5
  • 13

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

Niklas Siefke
  • 343
  • 5
  • 13
0

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

Amitabh
  • 162
  • 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
  • 114,585
  • 152
  • 739
  • 1,270