zoukankan      html  css  js  c++  java
  • stackFromBottom-listview 内容从底部开始填充

    今天遇到了一个问题,就是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

  • 相关阅读:
    A bon chat, bon rat
    获取信息mysql
    Lua笔记3 表达式
    libevent2编译
    opencv环境搭建
    bash console
    Unix Notes.
    ubuntu vsftpd
    axis2客户端代码生成
    IDEA 快捷键
  • 原文地址:https://www.cnblogs.com/zhangshuli-1989/p/zhangshuli_stack_150318133.html
Copyright © 2011-2022 走看看