android常用布局样式上、中、下三层
16lz
2021-01-25
我们在常用开发中经常用到一种布局结构,就是类似网页的页头、中间内容、页尾,下面我们就来看看在android中是怎样布局的。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" > <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:text="111111" /> </LinearLayout> <ListView android:id="@android :id/list" android:layout_width="match_parent" android:layout_height="wrap_content" > </ListView> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" > <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:text="222222" /> </LinearLayout></RelativeLayout>
我的博客其它文章列表
http://my.oschina.net/helu
更多相关文章
- Android——四大组件、六大布局、五大存储
- android pullToRefreshListView的item点击没有反应
- Android(安卓)底部导航栏BottomNavigationView的使用
- Android仿微信右上角点击加号弹出PopupWindow
- Android(安卓)Studio lint工具所提示的需要注意的内容简要记录
- Android(安卓)WebView 中遇到的问题集锦
- android 开发技巧(7)--附加 Ken Burns 特效的幻灯片
- Android开发 常用控件罕见特殊属性集锦
- 【Android】AlertDialog与ListAdapter