i trying add elevation widget layout. placed android:elevation in root layout, tried putting in child relative layout also.
<relativelayout android:id="@+id/main_layout" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/widget_background" android:elevation="30dp"> <relativelayout android:id="@+id/widget_bad_data_text" android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="visible"> <imageview android:id="@+id/widget_no_data_icon" android:layout_width="@dimen/widget_1x1_icon_width_height" android:layout_height="@dimen/widget_1x1_icon_width_height" android:layout_centerhorizontal="true" android:layout_margintop="@dimen/widget_1x1_margin_top"/> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/widget_no_data_icon" android:text="@string/widget" android:layout_centerhorizontal="true" android:fontfamily="sans-serif-light" android:textcolor="@android:color/white" android:textsize="@dimen/widget_1x1" tools:ignore="unusedattribute,spusage" /> </relativelayout> </relativelayout>
you're adding elevation
base container. able see elevation effect, set margin 30dp
.
Comments
Post a Comment