Android:elevation not working



I'm have to develop an android wear application, and Android:elevation in activity not showing a shadow.


XML Code of activity -



<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
tools:deviceIds="wear_round"
android:id="@+id/round_activity_main"
style="@style/AppTheme"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true">

<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:id="@+id/frameLayout"
android:elevation="10sp"
android:layout_alignParentEnd="true">

<TextView
android:layout_width="fill_parent"
android:layout_height="40sp"
android:gravity="center"
android:maxLines="2"
android:id="@+id/tvResult"
android:textStyle="bold"
android:text=""
android:fontFamily="sans-serif-light"
style="@style/AppTheme"
android:layout_marginLeft="40sp"
android:layout_marginRight="40sp"
android:layout_marginTop="20dp" />

</FrameLayout>

<android.support.v4.view.ViewPager
xmlns:android="http://ift.tt/nIICcg"
android:id="@+id/pagerRound"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="@style/AppTheme"
android:layout_below="@+id/frameLayout" />

</RelativeLayout>


In the preview shadow displayed, in the emulator no shadows


No comments:

Post a Comment