2

Following image is what I achieved so far. However, I want to align my buttons proportionally around the half circle. Can you please help me out?

enter image description here

Here is my xml:

<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"
    tools:context=".MainActivity"
    android:orientation="horizontal">



    <ImageView
        android:id="@+id/halfcircle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/halfcircle"
        android:layout_centerVertical="true" />

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_centerVertical="true"
        android:layout_toRightOf="@+id/halfcircle">

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginBottom="30dp"
            android:background="@color/red"
            android:padding="10dp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Button 1"/>
        </LinearLayout>

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginBottom="30dp"
            android:layout_marginLeft="10dp"
            android:background="@color/red"
            android:padding="10dp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Button 1"/>
        </LinearLayout>

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginBottom="30dp"
            android:layout_marginLeft="10dp"
            android:background="@color/red"
            android:padding="10dp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Button 1"/>
        </LinearLayout>

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginBottom="30dp"
            android:layout_marginLeft="10dp"
            android:background="@color/red"
            android:padding="10dp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Button 1"/>
        </LinearLayout>

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginBottom="30dp"
            android:background="@color/red"
            android:padding="10dp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Button 1"/>
        </LinearLayout>



    </LinearLayout>



</RelativeLayout>
Figen Güngör
  • 12,169
  • 14
  • 66
  • 108

1 Answers1

0

In case anybody else want to achieve similar thing, this library helped me out: https://github.com/ogaclejapan/ArcLayout

Figen Güngör
  • 12,169
  • 14
  • 66
  • 108