and thank for your help.
I have an App Widget with the following layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/background"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:id="@+id/linear"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:orientation="vertical"
android:padding="10dp" >
<ImageView
android:id="@+id/borderimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/linear"
android:layout_alignLeft="@id/linear"
android:layout_alignRight="@id/linear"
android:layout_alignTop="@id/linear"
android:layout_gravity="center"
android:scaleType="fitCenter"
android:src="@drawable/box" />
<ImageView
android:id="@+id/backgroundimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/linear"
android:layout_alignLeft="@id/linear"
android:layout_alignRight="@id/linear"
android:layout_alignTop="@id/linear"
android:layout_gravity="center"
android:padding="2dp"
android:scaleType="fitCenter"
android:src="@drawable/gradient_box" />
As you can see I use two ImageView on top of the layout to create a background and a border
- backgroundimage is the background
- borderimage is the border
(I need to do this way because the background and the border needs to be changed at runtime).
I would like to add a shadow, to get an effect like this:
Any suggestion more than welcome! Thanks