android:orientation=“vertical” does not work for TabWidget

前端 未结 4 497
没有蜡笔的小新
没有蜡笔的小新 2020-12-09 05:47

My app has a tabhost with four tabs, and now I\'m trying to make nice layouts for landscape mode. In order to make use of additional horizontal space I want to put TabWidget

4条回答
  •  一生所求
    2020-12-09 06:03

    So, only important think that you must do is this:

    getTabWidget().setOrientation(LinearLayout.VERTICAL);
    

    Because TabWidget has hardcoded setOrientation(LinearLayout.HORIZONTAL); in initTabWidget() method. I don't know why.

提交回复
热议问题