1. Change card_background to default background color. In settings
light theme, background color is exactly the #fafafa
2. Change card_background_grey to colorSecondary, which is
material_grey_200 in settings light theme.
Bug:
36139640
Test: Screenshot
Change-Id: I20081e768985ce6c0b9000448ae48599f18b293a
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
- <item android:drawable="@color/card_background"/>
+ <item android:drawable="?android:attr/colorBackground"/>
</ripple>
\ No newline at end of file
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
- <item android:drawable="@color/card_background_grey"/>
+ <item android:drawable="?android:attr/colorSecondary"/>
</ripple>
android:layout_width="match_parent"
android:layout_height="@dimen/dashboard_category_height"
android:orientation="vertical"
- android:paddingBottom="8dip"
- android:background="@color/card_background">
+ android:paddingBottom="8dip">
<TextView android:id="@android:id/title"
android:layout_width="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="8dp"
- android:background="@color/card_background_grey"/>
+ android:background="?android:attr/colorSecondary"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/support_items"
android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:background="@color/card_background"/>
+ android:layout_width="match_parent"/>
</FrameLayout>
<View
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="@dimen/support_spacer_height"
- android:background="@color/card_background"/>
+ android:layout_height="@dimen/support_spacer_height"/>
<color name="running_processes_system_ram">#ff384248</color>
<color name="running_processes_free_ram">#ffced7db</color>
- <color name="card_background">#fffafafa</color>
-
<color name="wifi_divider">#ffe0e0e0</color>
<color name="sim_noitification">@*android:color/material_deep_teal_500</color>
<color name="usage_graph_dots">#B0BEC5</color>
- <color name="card_background_grey">#eeeeee</color>
-
<!-- Gestures settings -->
<color name="gestures_setting_background_color">#f5f5f5</color>
</style>
<style name="SupportEscalationCard">
- <item name="android:background">@color/card_background_grey</item>
+ <item name="android:background">?android:attr/colorSecondary</item>
<item name="android:gravity">center</item>
<item name="android:minHeight">368dp</item>
<item name="android:paddingStart">@dimen/support_escalation_card_padding_start</item>
</style>
<style name="EntityHeader">
- <item name="android:background">@color/card_background_grey</item>
+ <item name="android:background">?android:attr/colorSecondary</item>
<item name="android:gravity">center_horizontal</item>
<item name="android:paddingTop">16dp</item>
<item name="android:paddingStart">16dp</item>
import com.android.settings.TestConfig;
import com.android.settings.core.instrumentation.MetricsFeatureProvider;
import com.android.settings.dashboard.conditional.Condition;
+import com.android.settings.testutils.FakeFeatureFactory;
+import com.android.settings.testutils.shadow.SettingsShadowResources;
+import com.android.settings.testutils.shadow.ShadowDynamicIndexableContentMonitor;
import com.android.settingslib.drawer.DashboardCategory;
import com.android.settingslib.drawer.Tile;
import org.junit.Before;
import static org.mockito.Mockito.when;
@RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH,
+ sdk = TestConfig.SDK_VERSION,
+ shadows = {
+ SettingsShadowResources.class,
+ SettingsShadowResources.SettingsShadowTheme.class,
+ ShadowDynamicIndexableContentMonitor.class
+ })
public class DashboardAdapterTest {
@Mock
when(mResources
.getQuantityString(any(int.class), any(int.class), Matchers.<Object>anyVararg()))
.thenReturn("");
+ FakeFeatureFactory.setupForTest(context);
mDashboardAdapter = new DashboardAdapter(context, null, mMetricsFeatureProvider,
null, null);
mSuggestionHeaderData = new DashboardData.SuggestionHeaderData(true, 1, 0);
id = R.drawable.ic_settings_wireless;
} else if (id == R.drawable.app_filter_spinner_background) {
id = R.drawable.ic_expand_more_inverse;
+ } else if (id == R.drawable.selectable_card_grey) {
+ id = R.drawable.ic_expand_more_inverse;
}
return super.loadDrawable(value, id, theme);
}