Skip to content

Instantly share code, notes, and snippets.

@gohilbhagirath90
Last active June 15, 2019 10:20
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gohilbhagirath90/895e092a0769cfc6eb12 to your computer and use it in GitHub Desktop.
Save gohilbhagirath90/895e092a0769cfc6eb12 to your computer and use it in GitHub Desktop.
list item with left side half circle android
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:useLevel="false" >
<solid android:color="@android:color/white" />
<size
android:height="50dp"
android:width="50dp" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:useLevel="false" >
<solid android:color="@color/black" />
<size
android:height="50dp"
android:width="50dp" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:layout_margin="5dp"
>
<ImageView
android:contentDescription="@string/app_name"
android:id="@+id/rect"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginLeft="50dp"
android:layout_alignParentTop="true"
android:background="@color/black" />
<ImageView
android:id="@+id/circle"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@drawable/half_circle"
android:text="2"
android:gravity="center"
android:layout_marginLeft="-50dp"
android:padding="10dp"
android:layout_alignParentTop="true"
android:layout_alignStart="@+id/rect" />
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:padding="10dp"
android:layout_alignStart="@+id/circle"
android:src="@drawable/circle"/>
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment