• 简单实现Android顶部工具栏和底部工具栏(原创)


    (图)简单实现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>

     


     

  • 相关阅读:
    购物车实现原理
    百分百加载动画
    利用CORS实现跨域请求(转载)
    AMD与CMD(转载)
    移动端Web页面问题(转载)
    JQuery的一些简单功能
    js基础3
    Ajax完整篇(转载)
    js基础2
    阮一峰对js的见解(10大缺陷)
  • 原文地址:https://www.cnblogs.com/zhwl/p/2185775.html
Copyright © 2020-2023  润新知