简单实现Android顶部工具栏和底部工具栏(原创)
2011-09-23 09:09
666 查看
简单实现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>
相关文章推荐
- 简单实现Android顶部工具栏和底部工具栏
- 简单实现Android顶部工具栏和底部工具栏
- 简单实现Android顶部工具栏和底部工具栏
- Android顶部工具栏和底部工具栏的简单实现代码
- 简单实现Android顶部工具栏和底部工具栏
- 简单实现Android顶部工具栏和底部工具栏
- Android 解析RecyclerView(3)——以更简单的方法实现带顶部View和底部View的RecyclerView
- 简单实现Android底部工具栏
- 简单实现顶部和底部工具栏
- 简单实现顶部和底部工具栏
- Android 简单实现ListView顶部悬浮效果
- 【Android UI设计与开发】4.底部菜单栏(一)Fragment介绍和简单实现
- 【Android UI设计与开发】第15期:顶部标题栏(六)实现悬浮式顶部和底部标题栏效果
- Android回到底部和返回顶部实现
- Android 自定义ListView实现底部分页刷新与顶部下拉刷新
- Android 简单实现ListView顶部悬浮效果
- Android开发:顶部&底部Tab导航栏实现(TabLayout+ViewPager+Fragment)
- Android获取系统顶部状态栏(StatusBar)与底部工具栏(NavigationBar)的高度
- Android开发实现 回到底部和返回顶部(其一)
- android底部导航栏+viewPager+自定义view的简单实现