【问题标题】:View width problem when going landscape横向时的视图宽度问题
【发布时间】:2011-07-01 10:01:53
【问题描述】:

我有一个 TabHost->LinearLayout->Framelayout(都带有属性 android:layout_width="fill_parent")

反过来,FrameLayout 中包含的视图是这样的: ScrollView->Horizo​​ntalScrollView->TableLayout ,它们都具有 android:layout_width="fill_parent" 属性。

那么为什么当我横屏时,视图使用了大约 60% 的屏幕宽度?

也许不推荐这样的对象层次结构?

提前致谢。

【问题讨论】:

  • 我不知道发生了什么,但fill_parentdeprecated - 请改用match_parent。但这不应该引起您的问题。
  • 我被 4 卡住了,它无法识别 match_parent attr,所以甚至无法尝试。

标签: android view width landscape


【解决方案1】:

试试这个顺序,先横向滚动查看

 HorizontalScrollView->ScrollView->TableLayout 

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-09-05
    • 2011-06-25
    • 2018-08-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-22
    相关资源
    最近更新 更多