【问题标题】:auto resizing the height of the views自动调整视图的高度
【发布时间】:2014-08-01 22:57:08
【问题描述】:
    <ScrollView id="scrollGeneric" height ='auto' visible='false'>
        <View id="formView" height='auto'>
            <View id='distSlider' top='0' height='100'>
                <Label id="lblGeneric" >
                    Search Distance:
                </Label>
                <Slider id="sliderDistance" top="50" min="2" max="80" width="50%"/>
                <Label id="sliderDistanceText" width='auto' top="50" right="40" />
                <Label id="sliderDistanceTextMeasure" width='auto' top="50" right="10" text="km" />
            </View>
        </View>
    </ScrollView>

我已经为scrollView 和formView 设置了自动高度。但是,每当我在 formView 内添加更多视图时,窗口的大小不会随之垂直扩展。它最终会裁剪掉超过窗口高度的视图。

解决这个问题的唯一方法是在表单视图 div 中手动指定每个视图的高度。

无论如何我可以避免这样做,谢谢

【问题讨论】:

    标签: titanium-alloy


    【解决方案1】:

    您是否尝试过使用 Ti.UI.SIZE 代替高度?根据documentation,“height:auto 不建议用于新开发,将来会被弃用。”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-18
      • 1970-01-01
      • 2010-10-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多