Posts

Showing posts with the label Android Shape

Android Shape With Gradient Border And Shadow

Image
Answer : Here you go Create your layout <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#c8c0c0" android:orientation="vertical"> <LinearLayout android:layout_width="120dp" android:layout_height="120dp" android:layout_centerInParent="true" android:background="@drawable/my_rectangle"> </LinearLayout> </RelativeLayout> Create my_rectangle.xml file inside drawable folder <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle"> <gradient ...