Loading core/java/com/android/internal/widget/ActionBarContainer.java +4 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.util.AttributeSet; import android.view.ActionMode; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; /** Loading Loading @@ -109,7 +110,9 @@ public class ActionBarContainer extends FrameLayout { mTabContainer = tabView; if (tabView != null) { addView(tabView); tabView.getLayoutParams().width = LayoutParams.MATCH_PARENT; final ViewGroup.LayoutParams lp = tabView.getLayoutParams(); lp.width = LayoutParams.MATCH_PARENT; lp.height = LayoutParams.WRAP_CONTENT; tabView.setAllowCollapse(false); } } Loading core/java/com/android/internal/widget/ScrollingTabContainerView.java +6 −10 Original line number Diff line number Diff line Loading @@ -68,6 +68,11 @@ public class ScrollingTabContainerView extends HorizontalScrollView super(context); setHorizontalScrollBarEnabled(false); TypedArray a = getContext().obtainStyledAttributes(null, R.styleable.ActionBar, com.android.internal.R.attr.actionBarStyle, 0); setContentHeight(a.getLayoutDimension(R.styleable.ActionBar_height, 0)); a.recycle(); mTabLayout = createTabLayout(); addView(mTabLayout, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)); Loading @@ -91,16 +96,7 @@ public class ScrollingTabContainerView extends HorizontalScrollView mMaxTabWidth = -1; } int heightMode = MeasureSpec.getMode(heightMeasureSpec); int heightSize = MeasureSpec.getSize(heightMeasureSpec); if (heightMode != MeasureSpec.UNSPECIFIED) { if (mContentHeight == 0 && heightMode == MeasureSpec.EXACTLY) { // Use this as our content height. mContentHeight = heightSize; } heightSize = Math.min(heightSize, mContentHeight); heightMeasureSpec = MeasureSpec.makeMeasureSpec(heightSize, heightMode); } heightMeasureSpec = MeasureSpec.makeMeasureSpec(mContentHeight, MeasureSpec.EXACTLY); final boolean canCollapse = !lockedExpanded && mAllowCollapse; Loading Loading
core/java/com/android/internal/widget/ActionBarContainer.java +4 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.util.AttributeSet; import android.view.ActionMode; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; /** Loading Loading @@ -109,7 +110,9 @@ public class ActionBarContainer extends FrameLayout { mTabContainer = tabView; if (tabView != null) { addView(tabView); tabView.getLayoutParams().width = LayoutParams.MATCH_PARENT; final ViewGroup.LayoutParams lp = tabView.getLayoutParams(); lp.width = LayoutParams.MATCH_PARENT; lp.height = LayoutParams.WRAP_CONTENT; tabView.setAllowCollapse(false); } } Loading
core/java/com/android/internal/widget/ScrollingTabContainerView.java +6 −10 Original line number Diff line number Diff line Loading @@ -68,6 +68,11 @@ public class ScrollingTabContainerView extends HorizontalScrollView super(context); setHorizontalScrollBarEnabled(false); TypedArray a = getContext().obtainStyledAttributes(null, R.styleable.ActionBar, com.android.internal.R.attr.actionBarStyle, 0); setContentHeight(a.getLayoutDimension(R.styleable.ActionBar_height, 0)); a.recycle(); mTabLayout = createTabLayout(); addView(mTabLayout, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)); Loading @@ -91,16 +96,7 @@ public class ScrollingTabContainerView extends HorizontalScrollView mMaxTabWidth = -1; } int heightMode = MeasureSpec.getMode(heightMeasureSpec); int heightSize = MeasureSpec.getSize(heightMeasureSpec); if (heightMode != MeasureSpec.UNSPECIFIED) { if (mContentHeight == 0 && heightMode == MeasureSpec.EXACTLY) { // Use this as our content height. mContentHeight = heightSize; } heightSize = Math.min(heightSize, mContentHeight); heightMeasureSpec = MeasureSpec.makeMeasureSpec(heightSize, heightMode); } heightMeasureSpec = MeasureSpec.makeMeasureSpec(mContentHeight, MeasureSpec.EXACTLY); final boolean canCollapse = !lockedExpanded && mAllowCollapse; Loading