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

Commit 90c4a873 authored by Josh Guilfoyle's avatar Josh Guilfoyle Committed by Josh Guilfoyle
Browse files

Revert "Crude theming support for tab indicators."

This reverts commit 238a60da.
parent fce264d5
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -17,12 +17,10 @@
package android.widget;

import com.android.internal.R;
import com.android.internal.util.ThemeUtilities;

import android.app.LocalActivityManager;
import android.content.Context;
import android.content.Intent;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
@@ -497,14 +495,6 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1");
     */
    private class LabelIndicatorStrategy implements IndicatorStrategy {

        /**
         * Attribute that the global theme can use to override the framework
         * default tab indicator background. This should be removed in favor of
         * a translation table allowing the theme to simply replace
         * android.R.drawable.tab_indicator.
         */
        private static final String ATTR_TAB_INDICATOR_BACKGROUND = "android_tabIndicatorBackground";

        private final CharSequence mLabel;

        private LabelIndicatorStrategy(CharSequence label) {
@@ -526,15 +516,6 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1");
                // Donut apps get old color scheme
                tabIndicator.setBackgroundResource(R.drawable.tab_indicator_v4);
                tv.setTextColor(context.getResources().getColorStateList(R.color.tab_indicator_text_v4));
            } else {
                /* Check to see if the theme wants to override the background. */
                int tabIndicatorAttrId = ThemeUtilities.resolveDefaultStyleAttr(context,
                        ATTR_TAB_INDICATOR_BACKGROUND, 0);
                if (tabIndicatorAttrId != 0) {
                    TypedArray a = context.obtainStyledAttributes(new int[] { tabIndicatorAttrId });
                    tabIndicator.setBackgroundDrawable(a.getDrawable(0));
                    a.recycle();
                }
            }
            
            return tabIndicator;