今天遇到了一个问题,就是listview虽然占满了整个屏幕,但是,当它的内容只有几条的时候,它会从底部开始显示,上面留有空白。后来进入xml发现,listview有个属性stackFromBottom,就是它决定了listview内容填充方式

 <view class="com.android.mms.ui.MessageListView"
style="?android:attr/listViewWhiteStyle"
android:id="@+id/history"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1.0"
android:smoothScrollbar="true"
<!--默认为false--
android:stackFromBottom="false"
android:visibility="gone"
android:fadingEdge="none"
android:layout_marginBottom="1dip"
android:cacheColorHint="#00000000"
android:scrollbarAlwaysDrawVerticalTrack="false"
android:scrollbarStyle="insideOverlay"
android:paddingBottom="@dimen/input_text_height_adjusted"
android:transcriptMode="normal"
/>

它的意义就是

stackFromBottom="false":  从上到下依次填充listview

stackFromBottom="true":   从下到上一次填充listvew

stackFromBottom-listview 内容从底部开始填充的更多相关文章

  1. [Android Pro] android控件ListView顶部或者底部也显示分割线

    reference to  :  http://blog.csdn.net/lovexieyuan520/article/details/50846569 在默认的Android控件ListView在 ...

  2. c# 读取其他程序的ListView内容

    ArcMap没找到一个导出图层字段结构的功能,自已花点时间用C#做了个小工具,专门用来导arcmap中图层属性面板中的字段信息. 使用说明: 1) 点击“查找窗口”按钮.2) 在ListView控件上 ...

  3. Android ListView内容变化后的动态刷新

    ListView内容变化后的动态刷新 基本知识点: 1.更新适配器Adapter数据源 2.调用适配器Adapter的刷新方法notifyDataSetChanged() 首先需要定义ListView ...

  4. ListView滚动到底部判断

    参考:http://blog.csdn.net/jodan179/article/details/8017693 List13介绍的是ListView.OnScrollListener的 onScro ...

  5. Android ListView拉到顶/底部,像橡皮筋一样弹性回弹复位

     <Android ListView拉到顶/底部,像橡皮筋一样弹性回弹复位> Android本身的ListView拉到顶部或者底部会在顶部/底部边缘间隙出现一道"闪光&quo ...

  6. 如何让listview滚动到底部

    方法一: // msgListView是ListView控件 // adapter是ListView绑定的Adapter,如果不方便直接使用,也可以通过ListView的getAdapter()方法获 ...

  7. jquery mobile listview列表属性(搜索自动填充检索效果)

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name ...

  8. 第一天—ListView||内容提供者

    ###ListView1.创建一个ListView的控件2.在Layout包中创建一个布局,用来指定ListView每个条目的布局 例:Item3.找到ListView控件4.创建一个类继承适配器三个 ...

  9. 弹出输入框后,将listview内容遮住,解决方案

    转自http://blog.csdn.net/silence_cdsn/article/details/7987063 更改listview的布局属性 之前的布局: <ListView andr ...

随机推荐

  1. shrio 授权

    授权,也叫访问控制,即在应用中控制谁能访问哪些资源(如访问页面/编辑数据/页面操作等).在授权中需了解的几个关键对象:主体(Subject).资源(Resource).权限(Permission).角 ...

  2. .Net Web开发技术栈 收藏

    原文:http://www.cnblogs.com/1996V/p/7700087.html#!comments 有很多朋友有的因为兴趣,有的因为生计而走向了.Net中,有很多朋友想学,但是又不知道怎 ...

  3. Codefroces 731C. Socks

    C. Socks time limit per test 2 seconds memory limit per test 256 megabytes input standard input outp ...

  4. vuex的mutations如何传多个传参?

    1.不传参时的写法(官网例子): const store = new Vuex.Store({ state: { count: 1 }, mutations: { increment (state) ...

  5. 无闻go编程基础笔记

    Go语言做Web编程非常方便,并且在开发效率和程序运行效率方面都非常优秀.相比于Java,其最大的优势就是简便易用,而相比于PHP,它最大的优势就是性能好. (go做web)推荐Gorilla的库,里 ...

  6. Swift学习笔记(15)--下标脚本(Subscripts)

    下标脚本可以定义在类(Class).结构体(structure)和枚举(enumeration)这些目标中,使用中类似数组或者字典的用法 1.定义 定义下标脚本使用subscript关键字,语法: s ...

  7. OpenCASCADE Face Normals

    OpenCASCADE Face Normals eryar@163.com Abstract. 要显示一个逼真的三维模型,其顶点坐标.顶点法向.纹理坐标这三个信息必不可少.本文主要介绍如何在Open ...

  8. Levmar:Levenberg-Marquardt非线性最小二乘算法

    Levmar:Levenberg-Marquardt非线性最小二乘算法 eryar@163.com Abstract. Levmar is GPL native ANSI C implementati ...

  9. MAC 下的简单 SHELL 入门

    1.创建文件 .sh 文件 本例,将 sh 文件全名为 demo.sh,接下来使用随意熟悉的编辑器编辑命令就可以 2.编写 .sh 文件 #!/bin/sh echo +--------------- ...

  10. js的类和继承

    因为我使用java语言入门的编程,所以对javascript的类和继承有种想当然一样,或者是差不多的感觉,但实际上两者还是有很多不同的 首先我们说类,javascript中类的实现是基于原型继承机制的 ...