Last active
August 20, 2020 11:46
-
-
Save imran-samed/4ecd9553718cb9479d49da9ace633d6f to your computer and use it in GitHub Desktop.
I've created this to draw a circle with 4 images.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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:background="#fff" | |
tools:context=".MainActivity"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="0dp" | |
android:layout_weight="1" | |
android:orientation="horizontal"> | |
<RelativeLayout | |
android:layout_width="0dp" | |
android:layout_height="match_parent" | |
android:layout_weight="1"> | |
<ImageView | |
android:id="@+id/iv1" | |
android:layout_width="@dimen/arcSize" | |
android:layout_height="@dimen/arcSize" | |
android:layout_alignParentEnd="true" | |
android:layout_alignParentRight="true" | |
android:layout_alignParentBottom="true" | |
android:background="@drawable/arc_circle_top_left" /> | |
</RelativeLayout> | |
<RelativeLayout | |
android:layout_width="0dp" | |
android:layout_height="match_parent" | |
android:layout_weight="1" | |
android:orientation="horizontal"> | |
<ImageView | |
android:id="@+id/iv2" | |
android:layout_width="@dimen/arcSize" | |
android:layout_height="@dimen/arcSize" | |
android:layout_alignParentStart="true" | |
android:layout_alignParentLeft="true" | |
android:layout_alignParentBottom="true" | |
android:background="@drawable/arc_circle_top_right" /> | |
</RelativeLayout> | |
</LinearLayout> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="0dp" | |
android:layout_weight="1" | |
android:orientation="horizontal"> | |
<RelativeLayout | |
android:layout_width="0dp" | |
android:layout_height="match_parent" | |
android:layout_weight="1" | |
android:orientation="horizontal"> | |
<ImageView | |
android:id="@+id/iv3" | |
android:layout_width="@dimen/arcSize" | |
android:layout_height="@dimen/arcSize" | |
android:layout_alignParentTop="true" | |
android:layout_alignParentEnd="true" | |
android:layout_alignParentRight="true" | |
android:background="@drawable/arc_circle_bottom_left" /> | |
</RelativeLayout> | |
<RelativeLayout | |
android:layout_width="0dp" | |
android:layout_height="match_parent" | |
android:layout_weight="1" | |
android:orientation="horizontal"> | |
<ImageView | |
android:id="@+id/iv4" | |
android:layout_width="@dimen/arcSize" | |
android:layout_height="@dimen/arcSize" | |
android:layout_alignParentStart="true" | |
android:layout_alignParentLeft="true" | |
android:layout_alignParentTop="true" | |
android:background="@drawable/arc_circle_bottom_right" /> | |
</RelativeLayout> | |
</LinearLayout> | |
</LinearLayout> | |
</RelativeLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment