常用布局
来源:互联网 发布:电脑怎么看网络电视 编辑:程序博客网 时间:2024/05/22 17:12
1:顶部横向拉动和页面切换布局
<android.support.design.widget.TabLayout android:id="@+id/tab" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" /><android.support.v4.view.ViewPager android:id="@+id/vp" android:layout_weight="8" android:layout_width="match_parent" android:layout_height="0dp"/>2,侧拉隐藏fragment布局
<android.support.v4.widget.DrawerLayout 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.bwie.yuekaolianxi1.MainActivity"> <RelativeLayout android:id="@+id/rl" android:layout_gravity="start" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ff3660"> <RelativeLayout android:layout_width="match_parent" android:layout_height="180dp"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:background="@mipmap/ic_launcher"/> </RelativeLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="190dp" android:layout_marginLeft="20dp" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="sssss" android:textSize="25sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="sssss" android:textSize="25sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="sssss" android:textSize="25sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="sssss" android:textSize="25sp"/> </LinearLayout> </RelativeLayout>
</android.support.v4.widget.DrawerLayout>
3:底部fragment按钮布局
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <FrameLayout android:id="@+id/fl" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="9"></FrameLayout> <RadioGroup android:id="@+id/rg" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="horizontal"> <RadioButton android:id="@+id/but01" android:layout_weight="1" android:layout_width="match_parent" android:layout_height="match_parent" android:text="首页" android:gravity="center" android:button="@null" android:background="#ff3660"/> <RadioButton android:id="@+id/but02" android:layout_weight="1" android:layout_width="match_parent" android:layout_height="match_parent" android:text="自选" android:gravity="center" android:button="@null" android:background="#ff0"/> <RadioButton android:id="@+id/but03" android:layout_weight="1" android:layout_width="match_parent" android:layout_height="match_parent" android:text="行情" android:gravity="center" android:button="@null" android:background="#eeffee"/> <RadioButton android:id="@+id/but04" android:layout_weight="1" android:layout_width="match_parent" android:layout_height="match_parent" android:text="咨询" android:gravity="center" android:button="@null" android:background="#00f"/> <RadioButton android:id="@+id/but05" android:layout_weight="1" android:layout_width="match_parent" android:layout_height="match_parent" android:text="交易" android:gravity="center" android:button="@null" android:background="#ff00"/> </RadioGroup></LinearLayout>4:上拉下拉刷新布局
<com.handmark.pulltorefresh.library.PullToRefreshListView android:id="@+id/plv" android:layout_width="match_parent" android:layout_height="match_parent"/>
阅读全文
0 0
- 常用布局
- 常用布局
- 常用布局
- 常用布局
- 常用布局
- 常用布局
- 常用布局
- CSS常用布局实例
- 常用div+css布局
- CSS常用布局实例
- ext 常用布局
- css常用布局网站。
- css常用布局
- css常用布局样式
- css常用布局样式
- Android中的常用布局
- Ext常用布局处理
- android 常用的布局
- [斜率DP优化]BZOJ 1911: [Apio2010]特别行动队 题解
- 浅析Handler引起的内存泄漏及解决方法
- TCP层与数据链路层流量控制的区别
- 程序运行时,MySQL弹出一个taskeng.exe. 内容如下: 关闭定时任务就可以
- 用一道题水过积性函数
- 常用布局
- An internal error occurred during: "Initializing Java Tooling". Eclipse启动发生的错误
- javascript map用法实例
- windows下tensorflow安装步骤
- FPGA电路逻辑的原理图方式设计与验证
- JAVA三大框架Struts、hibernate和spring的各自作用是什么?
- 29、Selenium + Python 实现 UI 自动化测试-正片1
- Mysql Group Replication 简介及单主模式组复制配置
- 如何从android应用向MYsql服务器发送数据?