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

Commit 05c8277f authored by Adam Powell's avatar Adam Powell
Browse files

Fix bug 5521467 - Monkeys and ActionBar custom tab views

Remove custom tab views from old parents if applicable.

Change-Id: I7892f0f271e91a4fc9e26694557e82b81f3fd31a
parent 7859c184
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.text.TextUtils.TruncateAt;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.animation.DecelerateInterpolator;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
@@ -392,7 +393,11 @@ public class ScrollingTabContainerView extends HorizontalScrollView
            final ActionBar.Tab tab = mTab;
            final View custom = tab.getCustomView();
            if (custom != null) {
                final ViewParent customParent = custom.getParent();
                if (customParent != this) {
                    if (customParent != null) ((ViewGroup) customParent).removeView(custom);
                    addView(custom);
                }
                mCustomView = custom;
                if (mTextView != null) mTextView.setVisibility(GONE);
                if (mIconView != null) {