(图)简单实现Android顶部工具栏和底部工具栏 简单实现Android顶部工具栏和底部工具栏


  

这两个工具栏全是用布局来实现的。底部工具栏布局代码:

  代码

  <?xml version="1.0" encoding="utf-8"?>

<RelativeLayout android:id="@+id/relativeLayout1"
android:background="@color/white" android:layout_width="fill_parent"
android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:background="@color/white" android:layout_height="wrap_content">

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_weight="1"
android:background="@color/white" android:layout_height="wrap_content">

<LinearLayout android:id="@+id/listLinearLayout"
android:layout_width="fill_parent" android:layout_height="match_parent"
android:orientation="vertical">


<ListView android:id="@+id/list_bendigaoku"
android:cacheColorHint="#00000000" android:paddingLeft="0dp"
android:paddingTop="0dp" android:paddingRight="0dp"
android:paddingBottom="0dp" android:layout_margin="0px"
android:layout_width="fill_parent" android:layout_height="wrap_content" />


<TextView android:layout_height="50dp" android:background="@color/white"
android:layout_width="fill_parent" />

</LinearLayout>

</LinearLayout>
<!-- 最下面的控件-->


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_alignParentBottom="true" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="40dp">
<!--分割线-->
<TextView android:layout_height="1dp" android:background="@color/grey"
android:layout_width="fill_parent" />

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="fill_parent"
android:layout_height="match_parent">
<Button android:textSize="10dp" android:text="@string/fanhui"
android:layout_weight="1" android:id="@+id/button1"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:onClick="click_fanhui" />
<TextView android:layout_height="wrap_content"
android:layout_weight="1" android:layout_width="wrap_content" />


<Button android:textSize="10dp" android:text="未上传"
android:id="@+id/button1" android:layout_weight="1"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:onClick="click_weishangchuan" />
<Button android:textSize="10dp" android:text="已上传"
android:id="@+id/button1" android:layout_weight="1"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:onClick="click_yishangchuan" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>


更多相关文章

  1. Android布局容器
  2. 控件布局_LinearLayout
  3. 系出名门Android(2) - 布局(Layout)和菜单(Menu)
  4. android 布局实例解析 柱状图效果
  5. C# mono android 图片上传进度条实现
  6. Android UI详解之动态布局
  7. Android 常用布局
  8. Android 文件实现断点上传

随机推荐

  1. Android中子布局填充ScrollView
  2. 【Android】AIDL介绍和实例讲解
  3. 把应用跑在android上
  4. android 将鼠标右键点击事件改为点击后返
  5. Android 中文 SDK —— ADT 14.0.0 (ADT14
  6. ToggleButton自定义View学习
  7. Android探索之旅(第三十二篇)Android 每日g
  8. Android(ViewPager中的ViewPager)ViewPager
  9. 农民伯伯的2013
  10. 【Android】数据存储之Network