android - 在Android中以圆形布局动态添加imageViews

标签 android

我想像圆盘一样在一个圆圈中动态添加imageViews。 Android 不提供圆形布局所以请帮我创建一个圆形布局.. 提前致谢!

最佳答案

只需检查一下,此链接显示了如何制作圆形 View ...只需在其中实现 ImageView ...

http://developer.samsung.com/android/samples-4

或者您可以通过 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>

关于android - 在Android中以圆形布局动态添加imageViews,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14996891/

相关文章:

java - 如何在 Eclipse Android 开发中使用自定义 View ?

android - 致命异常:IllegalStateException无法执行 Activity 的方法

android - 在 fragment tabhost 中的选项卡之间切换

android - Room @Relation 与复合主键

安卓 5.0 : how to change recent apps title color?

Android SQLite 大量行

c# - Xamarin.android 项目,如何删除警告 : duplicate zip entry [classes. jar...]

android - 使用谷歌登录 `gms.auth.UserRecoverableAuthException: BadAuthentication` 异常 android

java - JNI Android - 将 char* 转换为字节数组并将其返回给 java

android - 中止消息 : 'couldn' t find an OpenGL ES implementation'