Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0067057c authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 9035 into donut

* changes:
  Fix the TabWidget to display custom views for the tabs better when the tabs have different sizes.
parents 3d716ed6 5d5cd178
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -277,7 +277,7 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
        if (child.getLayoutParams() == null) {
            final LinearLayout.LayoutParams lp = new LayoutParams(
                    0,
                    ViewGroup.LayoutParams.WRAP_CONTENT, 1);
                    ViewGroup.LayoutParams.FILL_PARENT, 1.0f);
            lp.setMargins(0, 0, 0, 0);
            child.setLayoutParams(lp);
        }
@@ -289,10 +289,10 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
        // If we have dividers between the tabs and we already have at least one
        // tab, then add a divider before adding the next tab.
        if (mDividerDrawable != null && getTabCount() > 0) {
            View divider = new View(mContext);
            ImageView divider = new ImageView(mContext);
            final LinearLayout.LayoutParams lp = new LayoutParams(
                    mDividerDrawable.getIntrinsicWidth(),
                    mDividerDrawable.getIntrinsicHeight());
                    LayoutParams.FILL_PARENT);
            lp.setMargins(0, 0, 0, 0);
            divider.setLayoutParams(lp);
            divider.setBackgroundDrawable(mDividerDrawable);