</intent-filter>
</activity>
- <!--
<activity android:name="Settings$AppOpsSummaryActivity"
android:label="@string/app_ops_settings"
android:taskAffinity=""
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
android:resource="@id/application_settings" />
</activity>
- -->
<activity android:name="Settings$LocationSettingsActivity"
android:label="@string/location_settings_title"
import android.app.Fragment;
import android.app.FragmentManager;
+import android.content.res.Resources;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.preference.PreferenceFrameLayout;
import android.support.v13.app.FragmentPagerAdapter;
import android.support.v4.view.PagerTabStrip;
import android.support.v4.view.ViewPager;
+import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
mViewPager.setOnPageChangeListener(adapter);
PagerTabStrip tabs = (PagerTabStrip) rootView.findViewById(R.id.tabs);
- // This should be set in the XML layout, but PagerTabStrip lives in
- // support-v4 and doesn't have styleable attributes.
- final TypedArray ta = tabs.getContext().obtainStyledAttributes(
- new int[] { android.R.attr.colorAccent });
- final int colorAccent = ta.getColor(0, 0);
- ta.recycle();
-
- tabs.setTabIndicatorColorResource(colorAccent);
+ Resources.Theme theme = tabs.getContext().getTheme();
+ TypedValue typedValue = new TypedValue();
+ theme.resolveAttribute(android.R.attr.colorAccent, typedValue, true);
+ final int colorAccent = getContext().getColor(typedValue.resourceId);
+ tabs.setTabIndicatorColor(colorAccent);
// We have to do this now because PreferenceFrameLayout looks at it
// only when the view is added.