本文实例为大家分享了Android九宫格图片展示的具体代码,供大家参考,具体内容如下先布局实现mian.xml<?xml version="1.0" encoding="utf-8"?> <Relative
本文实例为大家分享了Android九宫格图片展示的具体代码,供大家参考,具体内容如下
先布局实现mian.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="Http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.bwei.fragment.MainActivity"> <android.support.v4.view.ViewPager android:id="@+id/pager" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <RadioGroup android:id="@+id/radioGroup1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignBottom="@+id/pager" android:layout_centerHorizontal="true" android:orientation="horizontal" android:background="#ccc" > <RadioButton android:id="@+id/radio0" android:layout_width="0dp" android:layout_height="match_parent" android:checked="true" android:button="@null" android:layout_weight="1" android:text="微信" android:drawableTop="@mipmap/ic_launcher_round" android:gravity="center" /> <RadioButton android:id="@+id/radio1" android:layout_width="0dp" android:layout_height="match_parent" android:button="@null" android:layout_weight="1" android:text="通讯录" android:drawableTop="@mipmap/ic_launcher_round" android:gravity="center" /> <RadioButton android:id="@+id/radio2" android:layout_width="0dp" android:layout_height="match_parent" android:button="@null" android:layout_weight="1" android:text="发现" android:drawableTop="@mipmap/ic_launcher_round" android:gravity="center" /> <RadioButton android:id="@+id/radio3" android:layout_width="0dp" android:layout_height="wrap_content" android:button="@null" android:layout_weight="1" android:text="我的" android:drawableTop="@mipmap/ic_launcher_round" android:gravity="center"/> </RadioGroup> </RelativeLayout>
--结束END--
本文标题: Android中fragment+viewpager实现布局
本文链接: https://www.lsjlt.com/news/220529.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0