我们在常用开发中经常用到一种布局结构,就是类似网页的页头、中间内容、页尾,下面我们就来看看在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

更多相关文章

  1. Android——四大组件、六大布局、五大存储
  2. android pullToRefreshListView的item点击没有反应
  3. Android(安卓)底部导航栏BottomNavigationView的使用
  4. Android仿微信右上角点击加号弹出PopupWindow
  5. Android(安卓)Studio lint工具所提示的需要注意的内容简要记录
  6. Android(安卓)WebView 中遇到的问题集锦
  7. android 开发技巧(7)--附加 Ken Burns 特效的幻灯片
  8. Android开发 常用控件罕见特殊属性集锦
  9. 【Android】AlertDialog与ListAdapter

随机推荐

  1. android content provider
  2. Android中Intent传值
  3. Android(安卓)加载大图片是出现的 OutOfM
  4. android中使用SQLite进行CRUD操作的实例
  5. Android的pagerAdapter源码,在线查看网址
  6. android 图片的浏览、缩放、拖动和自动居
  7. 设置 Toolbar(ActionBar) 上的按钮颜色
  8. android 安装软件
  9. Android(安卓)如何实现屏幕转换方向
  10. Android布局管理器