开创了Android的一个圆形视图 [英] creating a Circular view in android
问题描述
我想创建一个视图,该图标放置在圆形视图而不是像网格或画廊视图现有的视图。我试着用旋转木马的例子,但后来发现它不能满足我的要求,因为它的3D应用程序,但我期待的2D视图的Android 3D旋转木马
I am trying to create a view where the icons are placed in the circular view rather then the existing view like grid or the gallery view. I tried with Carousel example but later on found that it will not meet my requirement because its 3D app, but i am looking for 2D View.Android 3D Carousel
这是我在下面的例子。我能得到圆形那种,但能满足我的要求,我应该用2D坚持的东西。
This is the example that I was following. I was able to get the circular kind of thing but to meet my requirement I should stick with 2D.
我多了一个主要的要求是内圆认为我还必须有另外一个圆形的观点,类似下图
My one more major requirement is inside circular view I must also have another circular view, something like below figure
谁能帮我在这?
推荐答案
有关每圈的布局,我建议<一href="http://stackoverflow.com/questions/6830023/layout-with-buttons-in-a-circle/6835326#6835326">this回答质疑的布局在一个圆圈按钮,因为它定义了封闭RelativeLayout的中心您的物品的相对位置,无论其大小。然后,您可以覆盖这两个圆的布局是这样的:
For the layout of each circle I suggest this answer to question layout with buttons in a circle because it defines your item positions relative to the center of the enclosing RelativeLayout regardless of its size. You can then overlay the two circle layouts thus:
<RelativeLayout ...>
<RelativeLayout // outer circle
android:layout_alignParentCenter>
...
</RelativeLayout>
<RelativeLayout // inner circle
android:layout_alignParentCenter>
...
</RelativeLayout>
</RelativeLayout>
要独立地旋转每个圆的,我建议如下的<一个href="http://stackoverflow.com/questions/3444764/rotate-view-hierarchy-90-degrees/4624242#4624242">this回答质疑**旋转视图层次90度。
To rotate each of the circles independently, I suggest following this answer to question **Rotate View Hierarchy 90 Degrees".
这篇关于开创了Android的一个圆形视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!