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

  • 相关阅读:
    luogu P1415 拆分数列 序列DP
    [HAOI2015]树上操作
    [SHOI2012]魔法树
    [SCOI2010]连续攻击游戏
    [NOI2016]区间
    简单数论(一)
    iermu爱耳目
    李宇春:会跳舞的文艺青年
    文峰塔很安祥
    技术宅之flappy bird 二逼鸟
  • 原文地址:https://www.cnblogs.com/zhangshuli-1989/p/zhangshuli_stack_150318133.html
Copyright © 2011-2022 走看看