From a7e77546ca9e408373b7718aaf807bbbb5097cbe Mon Sep 17 00:00:00 2001 From: Roger Olsson Date: Tue, 26 Oct 2010 14:41:01 +0200 Subject: TabWidget orientation TabWidget orientation specified in tab_content.xml instead of TabWidget.java. Generally, the orientation of the TabWidget should be set in xml-files and not in TabWidget.java. A sub class of TabActivity may call setContentView() using a custom layout where the TabWidget orientation is vertical. This is the case in the UI Enablers Bottom Tab feature, for landscape display orientation. Change-Id: Ia677441a0af96a8d2ab47ef3298eb440c34924f6 --- core/java/android/widget/TabWidget.java | 1 - core/res/res/layout/tab_content.xml | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/java/android/widget/TabWidget.java b/core/java/android/widget/TabWidget.java index 4e1b585..830fcd1 100644 --- a/core/java/android/widget/TabWidget.java +++ b/core/java/android/widget/TabWidget.java @@ -106,7 +106,6 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener { } private void initTabWidget() { - setOrientation(LinearLayout.HORIZONTAL); mGroupFlags |= FLAG_USE_CHILD_DRAWING_ORDER; final Context context = mContext; diff --git a/core/res/res/layout/tab_content.xml b/core/res/res/layout/tab_content.xml index 0ee87ce..79147fb 100644 --- a/core/res/res/layout/tab_content.xml +++ b/core/res/res/layout/tab_content.xml @@ -22,8 +22,9 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + -- cgit v1.1