Reputation: 421
I want to add imageViews dynamically in a circle like a round plate. Android dose not provide a circular layout so please help me to create a circular layout.. Thanks in advance!
Upvotes: 1
Views: 951
Reputation: 11
From your question I can see that you need a circular layout on Android to arrange your images. I think this library will help you doing this. this library gives you the ability to add item, rotate them with animation. Check it out!
Upvotes: 1
Reputation: 1856
Just check this out , this link shows how to make view in circular shape... just imlement your image view in it ...
http://developer.samsung.com/android/samples-4
or you can do this by xml :
<LinearLayout orientation=vertical for whole screen>
<LinearLayout weight=1 gravity=center> <!--- Top --->
</LinearLayout>
<LinearLayout weight=1 orientation=horizontal> <!-- middle -->
<LinearLayout weight=1 gravity=left/>
<LinearLayout weight=1 gravity=right/>
</LinearLayout>
<LinearLayout weight=1> <!-- botton -->
<LinearLayout weight=1 gravity=center/>
<LinearLayout weight=1 gravity=center/>
</LinearLayout>
</LinearLayout>
Upvotes: 1
Reputation: 20563
You don't need a special layout for this.You can use a Relative Layout or a Frame Layout.
Just add the views dynamically in the normal way but position them using margin, padding etc so that they look like a circle.
Upvotes: 1