zoukankan      html  css  js  c++  java
  • ScrollView嵌套LinearLayout布局不能撑满全屏的问题

    当ScrollView里的元素想填满ScrollView时,使用"fill_parent"或者"match_parent"是不管用的,必需为ScrollView设置:android:fillViewport="true"。  

       当ScrollView没有fillVeewport=“true”时, 里面的元素(比如LinearLayout)会按照wrap_content来计算(不论它是否设了"fill_parent"或者"match_parent"),而如果LinearLayout的元素设置了fill_parent,那么也是不管用的,因为LinearLayout依赖里面的元素,而里面的元素又依赖LinearLayout,这样自相矛盾.所以里面元素设置了fill_parent,也会当做wrap_content来计算.

  • 相关阅读:
    SSH异常
    jquery效果摘要
    js随笔
    html随笔
    demo小样
    SVG图标
    jQuery笔记
    html / css学习笔记-3
    angular 学习笔记
    ng-route使用笔记
  • 原文地址:https://www.cnblogs.com/Jackie-zhang/p/6894977.html
Copyright © 2011-2022 走看看