相对布局:

<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="com.dr.app.drseamoniter.HistoryDataFragment">

    <ListView
        android:id="@+id/history_data_list"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/history_data_bottom"/>

    <LinearLayout
        android:id="@+id/history_data_bottom"
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:layout_alignParentBottom="true">

        <ImageView
            android:id="@+id/page_back"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center"
            android:src="@drawable/page_back"/>
        <EditText
            android:id="@+id/page"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:textSize="12sp"
            android:layout_weight="1"/>
        <ImageView
            android:id="@+id/page_forward"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:layout_weight="1"
            android:src="@drawable/page_forward"/>
        <TextView
            android:id="@+id/total_page_count"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/data_list_page_count"
            android:gravity="center"
            android:textSize="12sp"
            android:layout_weight="1"/>
        <TextView
            android:id="@+id/total_count"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/data_list_count"
            android:gravity="center"
            android:textSize="12sp"
            android:layout_weight="1"/>
    </LinearLayout>

</RelativeLayout >

参考博客:Android常见错误

在相对布局中,若是用到android:layout_above属性,并且其后id之前没有出现过,那么需要这样写:android:layout_above="@+id/vidAdd_ButtonGroup",多加一个“+”。

Android --固定底部的更多相关文章

  1. Android应用底部导航栏(选项卡)实例

    现在很多android的应用都采用底部导航栏的功能,这样可以使得用户在使用过程中随意切换不同的页面,现在我采用TabHost组件来自定义一个底部的导航栏的功能. 我们先看下该demo实例的框架图: 其 ...

  2. Android 修改底部导航栏navigationbar的颜色

    Android 修改底部导航栏navigationbar的颜色 getWindow().setNavigationBarColor(Color.BLUE); //写法一 getWindow().set ...

  3. 固定底部导航菜单-续集(BottomMenu-移动端V3.0)

    固定底部导航菜单-续集(BottomMenu-移动端V3.0) 适应在客户端,点击弹出二级菜单.因为手机不支持hover.所以使用click点击实现弹出菜单,并且一级菜单聚焦变色,变化背景图片 核心c ...

  4. Android自定义底部带有动画的Dialog

    Android自定义底部带有动画的Dialog 效果图 先看效果图,是不是你想要的呢 自定义Dialog package --.view; import android.app.Dialog; imp ...

  5. 转 android 从底部弹出一个popuwindow,渐入渐出效果。我这里是用在购物车需要选择购买选项的操作。

    最近要改客户端,需要实现一个从底部弹出的popuwindow,像我这种渣渣android技术,能整出popuwindow但是整不出动画,百度之,记录一下. 从下面这个地址转的 http://blog. ...

  6. Android TabWidget底部显示

    TabHost控件默认使用LinearLayout包裹TabWidget和FrameLayout,布局文件如下: <TabHost xmlns:android="http://sche ...

  7. Android 回到底部和返回顶部实现

    效果 准备四张图片资源 首先XML布局 我们采用FrameLayout布局 代码: <?xml version="1.0" encoding="utf-8" ...

  8. bootstrap 固定底部导航自适应

    在使用bootstrap 底部导航的时候遇到了一个问题 -- 当我的内容超过一屏的时候,底部的部分内容会被固定的导航内容遮盖 自己写了一个JS脚本,解决自适应的问题 <nav class=&qu ...

  9. html+css底部自动固定底部

    前端在切图过程中,肯定遇见过这种情况. 页面结构由三个部分组成,头部.内容.底部. 当一个页面的内容没撑满屏幕时,底部是跟着内容而并列存在的. 这个时候如果是大屏的话,底部下面会有多余的空白区域,而网 ...

随机推荐

  1. 禁用符合一定条件的AD对象 (含Filter参数的写法)

    Get-ADComputer -Filter "(sAMAccountType -eq 805306369)" -SearchBase "OU=Computers,OU= ...

  2. Angular:手动脏检查/$apply/$digest和监控对象/$watch

    声明:借鉴好多chm资料.视频.PDF总结如下: 一.$apply的引入 View <div ng-app=""> <div ng-controller=&quo ...

  3. uploadify 3.2 后台动态传参数

    最近在弄一个上传的小功能,需要往后台传递一些动态参数,网上有一些传参数可能是因为版本不对也没成功.仔细看了官网的一些说明,搞定了. 3.2中传递参数用的的是'formData':{'somekey': ...

  4. 用ultraISO 制作一个MSdos启动软盘镜像

    见过软盘,但是没用过,在虚拟机里试试. 磁带,软盘,光盘,硬盘…… 储存介质一代代更新,看到的img.iso文件都是叫做镜像文件(image file ).image 即图片照片,所谓的image f ...

  5. 简单排序算法 C++类实现

    简单排序算法: 冒泡排序 插入排序 选择排序 .h代码: // // SortClass.h // sort and selection // // Created by wasdns on 16/1 ...

  6. 背景图片与 CSS的那些事

    在CSS中,背景图片的定位方法有3种: 1)关键字:background-position: top left; 2)像素:background-position: 0px 0px; 3)百分比:ba ...

  7. Python的包管理工具--PIP安装使用

    最新安装方式 # wget https://bootstrap.pypa.io/get-pip.py # python get-pip.py  // 使用该方式安装已经不再要求提前安装setuptoo ...

  8. Linux下使用inode删除文件

    Linux 下有时候某些文件无法使用 rm 直接删除, 比如该文件的文件名含有终端不能正确显示的字符.# ls -litotal 0441511 -rw-r--r-- 1 root root 0 Ap ...

  9. javaWeb中servlet开发(2)——servlet与表单

    1.重写doGet方法 public class InputServlet extends HttpServlet{ public void doGet(HttpServletRequest req, ...

  10. Git学习笔记(持续更新)

    1.强制同步为远程的代码 远程仓库回退了commit的情况下(第2条描述之情况),强制同步远程的代码到本地 #更新远程最新的所有代码,但是不merge或者rebase git fetch --all ...