Search code examples
androidlayoutcurve

How to create Curve layout in Android?


I want to create an Curve layout like Sen want here How to create this layout?

Here at place of bubble I need button's, here want to move layout like gallery?

pls suggest me. Thanks


Solution

  • See this answer to the question layout with buttons in a circle. It provides a method to plot XY coordinates in your layout.

    EDIT 7/28/2011: The second answer to layout with buttons in a circle did not include XML. @Shubh asked for it in the comments, below, so I put this together:

    <RelativeLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent">
        <FrameLayout 
            android:layout_width="130dp"
            android:layout_height="85dp"
            android:background="#FFCC0000">
            <Button 
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_gravity="right|bottom"
            />
        </FrameLayout>  
        <FrameLayout 
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:background="#FFCCCC00">
            <Button 
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_gravity="right|bottom"
            />
        </FrameLayout>  
        <FrameLayout 
            android:layout_width="85dp"
            android:layout_height="130dp">
            <Button 
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_gravity="right|bottom"
            />
        </FrameLayout>  
    </RelativeLayout>
    

    enter image description here