Skip to content

Instantly share code, notes, and snippets.

@donnfelker
Created August 1, 2011 21:09
Show Gist options
  • Save donnfelker/1119010 to your computer and use it in GitHub Desktop.
Save donnfelker/1119010 to your computer and use it in GitHub Desktop.
Rounded Corners
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#6a9938"
>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="UI Examples"
android:textSize="25sp"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_marginTop="15dp"
android:layout_marginLeft="15dp"
/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="100dp"
android:layout_margin="15dp"
android:background="@drawable/rounded_corners_white">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_margin="15dp">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Rounded Corners!"
android:textStyle="bold"
android:textColor="#707070"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Bottom 2dp Shadow -->
<item>
<shape android:shape="rectangle">
<solid android:color="#d8d8d8" />
<corners android:radius="7dp" />
</shape>
</item>
<!-- White Top color -->
<item android:bottom="3px">
<shape android:shape="rectangle">
<solid android:color="#FFFFFF" />
<corners android:radius="7dp" />
</shape>
</item>
</layer-list>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment