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

Commit 5d5cd178 authored by Jack Veenstra's avatar Jack Veenstra
Browse files

Fix the TabWidget to display custom views for the tabs better when the tabs have different sizes.

parent 0869f7ef
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);