Merge "Misc ui tweaks."
This commit is contained in:
committed by
Android (Google) Code Review
commit
d611df7c48
@@ -20,9 +20,6 @@
|
||||
android:viewportHeight="24.0"
|
||||
android:tint="?android:attr/colorControlNormal">
|
||||
<path
|
||||
android:pathData="M20.8,13.56L13.5,9V3.5C13.5,2.67,12.83,2,12,2s-1.5,0.67-1.5,1.5V9l-7.3,4.56c-0.43,0.27-0.7,0.75-0.7,1.27v0.49
|
||||
c0,0.34,0.33,0.58,0.65,0.48l7.35-2.3V19l-1.6,1.2c-0.25,0.19-0.4,0.49-0.4,0.8v0.67c0,0.17,0.14,0.28,0.31,0.24
|
||||
c1.94-0.55,1.3-0.37,3.19-0.91c1.21,0.35,1.99,0.57,3.19,0.91c0.17,0.04,0.31-0.07,0.31-0.24V21c0-0.31-0.15-0.61-0.4-0.8L13.5,19
|
||||
v-5.5l7.35,2.3c0.32,0.1,0.65-0.14,0.65-0.48v-0.49C21.5,14.31,21.23,13.83,20.8,13.56z"
|
||||
android:pathData="M21,16v-2l-8,-5V3.5C13,2.67 12.33,2 11.5,2S10,2.67 10,3.5V9l-8,5v2l8,-2.5V19l-2,1.5V22l3.5,-1l3.5,1v-1.5L13,19v-5.5L21,16z"
|
||||
android:fillColor="#FFFFFFFF"/>
|
||||
</vector>
|
||||
|
@@ -22,8 +22,8 @@
|
||||
android:tint="?android:attr/colorAccent">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M15,14l-2,0l0,2l-2,0l0,-2l-2,0l0,-2l2,0l0,-2l2,0l0,2l2,0z"/>
|
||||
android:pathData="M16.67,4H14.5V2h-5v2H7.33C6.6,4 6,4.6 6,5.33V15v5.67C6,21.4 6.6,22 7.33,22h9.33C17.4,22 18,21.4 18,20.67V15V5.33C18,4.6 17.4,4 16.67,4zM16,15v5H8v-5V6h8V15z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M16.2,22.5H7.8c-1.3,0 -2.3,-1 -2.3,-2.3V5.8c0,-1.3 1,-2.3 2.3,-2.3h0.7v-2h7v2h0.7c1.3,0 2.3,1.1 2.3,2.3v14.3C18.5,21.5 17.5,22.5 16.2,22.5zM7.8,5.5c-0.2,0 -0.3,0.2 -0.3,0.3v14.3c0,0.2 0.2,0.3 0.3,0.3h8.3c0.2,0 0.3,-0.1 0.3,-0.3V5.8c0,-0.2 -0.1,-0.3 -0.3,-0.3h-2.7v-2h-3v2H7.8z"/>
|
||||
android:pathData="M15,12l-2,0l0,-2l-2,0l0,2l-2,0l0,2l2,0l0,2l2,0l0,-2l2,0z"/>
|
||||
</vector>
|
||||
|
@@ -15,11 +15,11 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:viewportWidth="48"
|
||||
android:viewportHeight="48"
|
||||
android:width="18dp"
|
||||
android:height="18dp">
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M36 16l-2 0 0 -4C34 6.48 29.52 2 24 2 18.48 2 14 6.48 14 12l0 4 -2 0c-2.21 0 -4 1.79 -4 4l0 20c0 2.21 1.79 4 4 4l24 0c2.21 0 4 -1.79 4 -4l0 -20c0 -2.21 -1.79 -4 -4 -4zM24 34c-2.21 0 -4 -1.79 -4 -4 0 -2.21 1.79 -4 4 -4 2.21 0 4 1.79 4 4 0 2.21 -1.79 4 -4 4zm6.2 -18l-12.4 0 0 -4c0 -3.42 2.78 -6.2 6.2 -6.2 3.42 0 6.2 2.78 6.2 6.2l0 4z"
|
||||
android:fillColor="?android:attr/colorControlNormal" />
|
||||
android:fillColor="?android:attr/colorControlNormal"
|
||||
android:pathData="M18,8h-1V6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2H6c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V10C20,8.9 19.1,8 18,8zM9,6c0,-1.66 1.34,-3 3,-3s3,1.34 3,3v2H9V6zM18,20H6V10h12V20zM12,17c1.1,0 2,-0.9 2,-2c0,-1.1 -0.9,-2 -2,-2c-1.1,0 -2,0.9 -2,2C10,16.1 10.9,17 12,17z"/>
|
||||
</vector>
|
||||
|
@@ -1,34 +0,0 @@
|
||||
<!--
|
||||
Copyright (C) 2016 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0"
|
||||
android:tint="?android:attr/colorAccent">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M21.4 14.2l-1.94-1.45c.03-.25 .04 -.5 .04 -.76s-.01-.51-.04-.76L21.4 9.8c.42-.31
|
||||
.52 -.94 .24 -1.41l-1.6-2.76c-.28-.48-.88-.7-1.36-.5l-2.14 .91
|
||||
c-.48-.37-1.01-.68-1.57-.92l-.27-2.2c-.06-.52-.56-.92-1.11-.92h-3.18c-.55 0-1.05
|
||||
.4 -1.11 .92 l-.26 2.19c-.57 .24 -1.1 .55 -1.58 .92 l-2.14-.91c-.48-.2-1.08 .02
|
||||
-1.36 .5 l-1.6 2.76c-.28 .48 -.18 1.1 .24 1.42l1.94 1.45c-.03 .24 -.04 .49 -.04
|
||||
.75 s.01 .51 .04 .76 L2.6 14.2c-.42 .31 -.52 .94 -.24 1.41l1.6 2.76c.28 .48 .88
|
||||
.7 1.36 .5 l2.14-.91c.48 .37 1.01 .68 1.57 .92 l.27 2.19c.06 .53 .56 .93 1.11
|
||||
.93 h3.18c.55 0 1.04-.4 1.11-.92l.27-2.19c.56-.24 1.09-.55 1.57-.92l2.14 .91
|
||||
c.48 .2 1.08-.02 1.36-.5l1.6-2.76c.28-.48 .18 -1.1-.24-1.42zM12 15.5c-1.93
|
||||
0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"/>
|
||||
</vector>
|
29
res/drawable/ic_settings_accent.xml
Normal file
29
res/drawable/ic_settings_accent.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<!--
|
||||
Copyright (C) 2016 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0"
|
||||
android:tint="?android:attr/colorAccent">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M13.85,22.25h-3.7c-0.74,0 -1.36,-0.54 -1.45,-1.27l-0.27,-1.89c-0.27,-0.14 -0.53,-0.29 -0.79,-0.46l-1.8,0.72c-0.7,0.26 -1.47,-0.03 -1.81,-0.65L2.2,15.53c-0.35,-0.66 -0.2,-1.44 0.36,-1.88l1.53,-1.19c-0.01,-0.15 -0.02,-0.3 -0.02,-0.46c0,-0.15 0.01,-0.31 0.02,-0.46l-1.52,-1.19C1.98,9.9 1.83,9.09 2.2,8.47l1.85,-3.19c0.34,-0.62 1.11,-0.9 1.79,-0.63l1.81,0.73c0.26,-0.17 0.52,-0.32 0.78,-0.46l0.27,-1.91c0.09,-0.7 0.71,-1.25 1.44,-1.25h3.7c0.74,0 1.36,0.54 1.45,1.27l0.27,1.89c0.27,0.14 0.53,0.29 0.79,0.46l1.8,-0.72c0.71,-0.26 1.48,0.03 1.82,0.65l1.84,3.18c0.36,0.66 0.2,1.44 -0.36,1.88l-1.52,1.19c0.01,0.15 0.02,0.3 0.02,0.46s-0.01,0.31 -0.02,0.46l1.52,1.19c0.56,0.45 0.72,1.23 0.37,1.86l-1.86,3.22c-0.34,0.62 -1.11,0.9 -1.8,0.63l-1.8,-0.72c-0.26,0.17 -0.52,0.32 -0.78,0.46l-0.27,1.91C15.21,21.71 14.59,22.25 13.85,22.25zM13.32,20.72c0,0.01 0,0.01 0,0.02L13.32,20.72zM10.68,20.7l0,0.02C10.69,20.72 10.69,20.71 10.68,20.7zM10.62,20.25h2.76l0.37,-2.55l0.53,-0.22c0.44,-0.18 0.88,-0.44 1.34,-0.78l0.45,-0.34l2.38,0.96l1.38,-2.4l-2.03,-1.58l0.07,-0.56c0.03,-0.26 0.06,-0.51 0.06,-0.78c0,-0.27 -0.03,-0.53 -0.06,-0.78l-0.07,-0.56l2.03,-1.58l-1.39,-2.4l-2.39,0.96l-0.45,-0.35c-0.42,-0.32 -0.87,-0.58 -1.33,-0.77L13.75,6.3l-0.37,-2.55h-2.76L10.25,6.3L9.72,6.51C9.28,6.7 8.84,6.95 8.38,7.3L7.93,7.63L5.55,6.68L4.16,9.07l2.03,1.58l-0.07,0.56C6.09,11.47 6.06,11.74 6.06,12c0,0.26 0.02,0.53 0.06,0.78l0.07,0.56l-2.03,1.58l1.38,2.4l2.39,-0.96l0.45,0.35c0.43,0.33 0.86,0.58 1.33,0.77l0.53,0.22L10.62,20.25zM18.22,17.72c0,0.01 -0.01,0.02 -0.01,0.03L18.22,17.72zM5.77,17.71l0.01,0.02C5.78,17.72 5.77,17.71 5.77,17.71zM3.93,9.47L3.93,9.47C3.93,9.47 3.93,9.47 3.93,9.47zM18.22,6.27c0,0.01 0.01,0.02 0.01,0.02L18.22,6.27zM5.79,6.25L5.78,6.27C5.78,6.27 5.79,6.26 5.79,6.25zM13.31,3.28c0,0.01 0,0.01 0,0.02L13.31,3.28zM10.69,3.26l0,0.02C10.69,3.27 10.69,3.27 10.69,3.26z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M12,12m-3.5,0a3.5,3.5 0,1 1,7 0a3.5,3.5 0,1 1,-7 0"/>
|
||||
</vector>
|
@@ -21,5 +21,5 @@
|
||||
android:viewportWidth="24">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M15.5,22c1.05,0 2.05,-0.16 3,-0.46c-4.06,-1.27 -7,-5.06 -7,-9.54s2.94,-8.27 7,-9.54C17.55,2.16 16.55,2 15.5,2c-5.52,0 -10,4.48 -10,10S9.98,22 15.5,22L15.5,22z"/>
|
||||
android:pathData="M6.28,4.81c0,0.16 0.01,0.32 0.02,0.48c0.38,6.58 5.83,12.03 12.41,12.41c0.16,0.01 0.32,0.02 0.47,0.02c-1.58,1.2 -3.53,1.88 -5.56,1.88c-0.46,0 -0.93,-0.03 -1.4,-0.1c-3.96,-0.58 -7.13,-3.75 -7.71,-7.71C4.13,9.24 4.8,6.75 6.28,4.81M8.27,0.6c-0.08,0 -0.17,0.02 -0.25,0.07c-3.8,2.2 -6.2,6.56 -5.49,11.4c0.7,4.82 4.59,8.7 9.4,9.4c0.57,0.08 1.13,0.12 1.69,0.12c4.15,0 7.78,-2.26 9.72,-5.62c0.2,-0.35 -0.07,-0.76 -0.44,-0.76c-0.05,0 -0.1,0.01 -0.15,0.02c-1.03,0.31 -2.12,0.48 -3.25,0.48c-0.22,0 -0.44,-0.01 -0.67,-0.02C13.23,15.38 8.62,10.77 8.29,5.17C8.21,3.81 8.38,2.49 8.75,1.26C8.86,0.91 8.59,0.6 8.27,0.6L8.27,0.6z"/>
|
||||
</vector>
|
||||
|
@@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2018 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/ContextualCardStyle">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/homepage_card_padding_start"
|
||||
android:paddingEnd="@dimen/homepage_full_card_padding_end"
|
||||
android:paddingTop="@dimen/homepage_condition_full_card_padding_top"
|
||||
android:paddingBottom="@dimen/homepage_condition_full_card_padding_bottom"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@dimen/homepage_card_icon_size"
|
||||
android:layout_height="@dimen/homepage_card_icon_size"
|
||||
android:tint="?android:attr/colorAccent"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="@dimen/homepage_condition_full_card_padding_start"
|
||||
android:paddingEnd="@dimen/homepage_condition_full_card_padding_end"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/homepage_condition_card_title_margin_bottom"
|
||||
android:textAppearance="@style/TextAppearance.ConditionCardTitle"/>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.ConditionCardSummary"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/vertical_divider"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/first_action"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/ConditionFullCardBorderlessButton"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
@@ -22,18 +22,20 @@
|
||||
style="@style/ContextualCardStyle">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/homepage_condition_half_card_padding_top"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/homepage_card_padding_start"
|
||||
android:paddingEnd="@dimen/homepage_card_padding_end"
|
||||
android:orientation="vertical">
|
||||
android:paddingEnd="@dimen/homepage_full_card_padding_end"
|
||||
android:paddingTop="@dimen/homepage_condition_full_card_padding_top"
|
||||
android:paddingBottom="@dimen/homepage_condition_full_card_padding_bottom"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
@@ -41,35 +43,45 @@
|
||||
android:layout_height="@dimen/homepage_card_icon_size"
|
||||
android:tint="?android:attr/colorAccent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="match_parent"
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginTop="@dimen/homepage_condition_half_card_title_margin_top"
|
||||
android:layout_marginBottom="@dimen/homepage_condition_card_title_margin_bottom"
|
||||
android:textAppearance="@style/TextAppearance.ConditionCardTitle"/>
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="@dimen/homepage_condition_full_card_padding_start"
|
||||
android:paddingEnd="@dimen/homepage_condition_full_card_padding_end"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginBottom="@dimen/homepage_condition_half_card_summary_margin_bottom"
|
||||
android:textAppearance="@style/TextAppearance.ConditionCardSummary"/>
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/homepage_condition_card_title_margin_bottom"
|
||||
android:textAppearance="@style/TextAppearance.ConditionCardTitle"/>
|
||||
|
||||
<include layout="@layout/horizontal_divider"/>
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.ConditionCardSummary"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp">
|
||||
<include
|
||||
layout="@layout/horizontal_divider"/>
|
||||
</FrameLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/first_action"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none"
|
||||
style="@style/ConditionHalfCardBorderlessButton"/>
|
||||
|
||||
style="@style/ConditionFullCardBorderlessButton"/>
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
@@ -55,14 +55,22 @@
|
||||
android:id="@android:id/summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:lines="2"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginBottom="@dimen/homepage_condition_half_card_summary_margin_bottom"
|
||||
android:textAppearance="@style/TextAppearance.ConditionCardSummary"/>
|
||||
|
||||
<include layout="@layout/horizontal_divider"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp">
|
||||
<include
|
||||
layout="@layout/horizontal_divider"/>
|
||||
</FrameLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/first_action"
|
||||
android:layout_width="match_parent"
|
||||
|
@@ -83,7 +83,7 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingStart="12dip"
|
||||
android:paddingEnd="12dp"
|
||||
android:src="@drawable/ic_settings"
|
||||
android:src="@drawable/ic_settings_accent"
|
||||
android:contentDescription="@string/apps_with_restrictions_settings_button"
|
||||
android:layout_gravity="center"
|
||||
android:clickable="true"
|
||||
|
@@ -25,6 +25,6 @@
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_settings"
|
||||
android:src="@drawable/ic_settings_accent"
|
||||
android:contentDescription="@string/settings_button" />
|
||||
|
||||
|
@@ -22,6 +22,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_settings"
|
||||
android:src="@drawable/ic_settings_accent"
|
||||
android:contentDescription="@string/settings_button" />
|
||||
|
||||
|
@@ -25,7 +25,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_settings"
|
||||
android:src="@drawable/ic_settings_accent"
|
||||
android:contentDescription="@string/settings_button" />
|
||||
<!-- Additional overdraw background to stop parent's material ripple -->
|
||||
<FrameLayout
|
||||
@@ -42,7 +42,7 @@
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_settings"
|
||||
android:src="@drawable/ic_settings_accent"
|
||||
android:contentDescription="@string/settings_button" />
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
@@ -35,7 +35,7 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingStart="16dip"
|
||||
android:paddingEnd="16dip"
|
||||
android:src="@drawable/ic_settings"
|
||||
android:src="@drawable/ic_settings_accent"
|
||||
android:contentDescription="@string/settings_label"
|
||||
android:layout_gravity="center"
|
||||
android:background="?android:attr/selectableItemBackground" />
|
||||
|
@@ -37,7 +37,7 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:padding="8dip"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_settings"
|
||||
android:src="@drawable/ic_settings_accent"
|
||||
android:contentDescription="@string/wifi_display_details" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -368,8 +368,8 @@
|
||||
<dimen name="homepage_condition_half_card_padding_top">12dp</dimen>
|
||||
<dimen name="homepage_condition_half_card_title_margin_top">12dp</dimen>
|
||||
<dimen name="homepage_condition_half_card_summary_margin_bottom">12dp</dimen>
|
||||
<dimen name="homepage_condition_full_card_padding_start">24dp</dimen>
|
||||
<dimen name="homepage_condition_full_card_padding_end">24dp</dimen>
|
||||
<dimen name="homepage_condition_full_card_padding_start">12dp</dimen>
|
||||
<dimen name="homepage_condition_full_card_padding_end">16dp</dimen>
|
||||
<dimen name="homepage_condition_full_card_padding_top">12dp</dimen>
|
||||
<dimen name="homepage_condition_full_card_padding_bottom">12dp</dimen>
|
||||
<dimen name="homepage_condition_header_padding_top">10dp</dimen>
|
||||
|
@@ -448,8 +448,9 @@
|
||||
|
||||
<style name="ConditionFullCardBorderlessButton"
|
||||
parent="@style/ConditionCardBorderlessButton">
|
||||
<item name="android:minWidth">24dp</item>
|
||||
<item name="android:layout_marginStart">20dp</item>
|
||||
<item name="android:textAlignment">viewStart</item>
|
||||
<item name="android:paddingStart">50dp</item>
|
||||
<item name="android:paddingEnd">50dp</item>
|
||||
</style>
|
||||
|
||||
<style name="ContextualCardDismissalButton"
|
||||
|
@@ -449,14 +449,14 @@ public class SliceBuilderUtils {
|
||||
int iconResource = data.getIconResource();
|
||||
|
||||
if (iconResource == 0) {
|
||||
iconResource = R.drawable.ic_settings;
|
||||
iconResource = R.drawable.ic_settings_accent;
|
||||
}
|
||||
try {
|
||||
return IconCompat.createWithResource(context, iconResource);
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "Falling back to settings icon because there is an error getting slice icon "
|
||||
+ data.getUri(), e);
|
||||
return IconCompat.createWithResource(context, R.drawable.ic_settings);
|
||||
return IconCompat.createWithResource(context, R.drawable.ic_settings_accent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -159,7 +159,7 @@ public class WifiSlice implements CustomSliceable {
|
||||
|
||||
private IconCompat getEndIcon(AccessPoint accessPoint) {
|
||||
if (accessPoint.isActive()) {
|
||||
return IconCompat.createWithResource(mContext, R.drawable.ic_settings);
|
||||
return IconCompat.createWithResource(mContext, R.drawable.ic_settings_accent);
|
||||
} else if (accessPoint.getSecurity() != AccessPoint.SECURITY_NONE) {
|
||||
return IconCompat.createWithResource(mContext, R.drawable.ic_friction_lock_closed);
|
||||
} else if (accessPoint.isMetered()) {
|
||||
|
@@ -99,7 +99,7 @@ public class SettingsSliceProviderTest {
|
||||
private static final String SUMMARY = "summary";
|
||||
private static final String SCREEN_TITLE = "screen title";
|
||||
private static final String FRAGMENT_NAME = "fragment name";
|
||||
private static final int ICON = R.drawable.ic_settings;
|
||||
private static final int ICON = R.drawable.ic_settings_accent;
|
||||
private static final Uri URI = Uri.parse("content://com.android.settings.slices/test");
|
||||
private static final String PREF_CONTROLLER = FakeToggleController.class.getName();
|
||||
|
||||
@@ -578,7 +578,7 @@ public class SettingsSliceProviderTest {
|
||||
values.put(SlicesDatabaseHelper.IndexColumns.TITLE, TITLE);
|
||||
values.put(SlicesDatabaseHelper.IndexColumns.SUMMARY, "s");
|
||||
values.put(SlicesDatabaseHelper.IndexColumns.SCREENTITLE, "s");
|
||||
values.put(SlicesDatabaseHelper.IndexColumns.ICON_RESOURCE, R.drawable.ic_settings);
|
||||
values.put(SlicesDatabaseHelper.IndexColumns.ICON_RESOURCE, R.drawable.ic_settings_accent);
|
||||
values.put(SlicesDatabaseHelper.IndexColumns.FRAGMENT, "test");
|
||||
values.put(SlicesDatabaseHelper.IndexColumns.CONTROLLER, PREF_CONTROLLER);
|
||||
values.put(SlicesDatabaseHelper.IndexColumns.PLATFORM_SLICE, isPlatformSlice);
|
||||
|
@@ -63,7 +63,7 @@ public class SliceBuilderUtilsTest {
|
||||
private final String SCREEN_TITLE = "screen title";
|
||||
private final String KEYWORDS = "a, b, c";
|
||||
private final String FRAGMENT_NAME = "fragment name";
|
||||
private final int ICON = R.drawable.ic_settings;
|
||||
private final int ICON = R.drawable.ic_settings_accent;
|
||||
private final Uri URI = Uri.parse("content://com.android.settings.slices/test");
|
||||
private final Class TOGGLE_CONTROLLER = FakeToggleController.class;
|
||||
private final Class SLIDER_CONTROLLER = FakeSliderController.class;
|
||||
@@ -431,7 +431,7 @@ public class SliceBuilderUtilsTest {
|
||||
@Test
|
||||
public void buildIntentSlice_noIconPassed_returnsSliceWithIcon() {
|
||||
final int expectedIconResource = IconCompat.createWithResource(mContext,
|
||||
R.drawable.ic_settings).toIcon().getResId();
|
||||
R.drawable.ic_settings_accent).toIcon().getResId();
|
||||
final SliceData sliceData = getDummyData(CONTEXT_CONTROLLER, SliceData.SliceType.INTENT,
|
||||
0x0);
|
||||
|
||||
@@ -446,7 +446,7 @@ public class SliceBuilderUtilsTest {
|
||||
@Test
|
||||
public void buildDisabledDependentSlice_noIconPassed_returnsSliceWithIcon() {
|
||||
final int expectedIconResource = IconCompat.createWithResource(mContext,
|
||||
R.drawable.ic_settings).toIcon().getResId();
|
||||
R.drawable.ic_settings_accent).toIcon().getResId();
|
||||
final SliceData data = getDummyData(FakeUnavailablePreferenceController.class,
|
||||
SUMMARY, SliceData.SliceType.SWITCH, SCREEN_TITLE, 0 /* icon */,
|
||||
IS_DYNAMIC_SUMMARY_ALLOWED, null /* unavailableSliceSubtitle */);
|
||||
@@ -465,7 +465,7 @@ public class SliceBuilderUtilsTest {
|
||||
@Test
|
||||
public void buildToggleSlice_noIconPassed_returnsSliceWithIcon() {
|
||||
final int expectedIconResource = IconCompat.createWithResource(mContext,
|
||||
R.drawable.ic_settings).toIcon().getResId();
|
||||
R.drawable.ic_settings_accent).toIcon().getResId();
|
||||
final SliceData dummyData = getDummyData(TOGGLE_CONTROLLER, SliceData.SliceType.SWITCH,
|
||||
0x0);
|
||||
|
||||
@@ -480,7 +480,7 @@ public class SliceBuilderUtilsTest {
|
||||
@Test
|
||||
public void buildSliderSlice_noIconPassed_returnsSliceWithIcon() {
|
||||
final int expectedIconResource = IconCompat.createWithResource(mContext,
|
||||
R.drawable.ic_settings).toIcon().getResId();
|
||||
R.drawable.ic_settings_accent).toIcon().getResId();
|
||||
final SliceData data = getDummyData(SLIDER_CONTROLLER, SliceData.SliceType.SLIDER, 0x0);
|
||||
|
||||
final Slice slice = SliceBuilderUtils.buildSlice(mContext, data);
|
||||
@@ -493,7 +493,7 @@ public class SliceBuilderUtilsTest {
|
||||
|
||||
@Test
|
||||
public void getSafeIcon_replacesEmptyIconWithSettingsIcon() {
|
||||
final int settingsIcon = R.drawable.ic_settings;
|
||||
final int settingsIcon = R.drawable.ic_settings_accent;
|
||||
final int zeroIcon = 0x0;
|
||||
final SliceData data = getDummyData(TOGGLE_CONTROLLER, SliceData.SliceType.SWITCH,
|
||||
zeroIcon);
|
||||
@@ -507,7 +507,7 @@ public class SliceBuilderUtilsTest {
|
||||
|
||||
@Test
|
||||
public void getSafeIcon_invalidResource_shouldFallbackToSettingsIcon() {
|
||||
final int settingsIcon = R.drawable.ic_settings;
|
||||
final int settingsIcon = R.drawable.ic_settings_accent;
|
||||
final int badIcon = 0x12345678;
|
||||
final SliceData data = getDummyData(TOGGLE_CONTROLLER, SliceData.SliceType.SWITCH,
|
||||
badIcon);
|
||||
|
@@ -43,6 +43,6 @@ public class ShadowTileUtils {
|
||||
@Implementation
|
||||
protected static Pair<String, Integer> getIconFromUri(Context context, String packageName,
|
||||
String uriString, Map<String, IContentProvider> providerMap) {
|
||||
return Pair.create(RuntimeEnvironment.application.getPackageName(), R.drawable.ic_settings);
|
||||
return Pair.create(RuntimeEnvironment.application.getPackageName(), R.drawable.ic_settings_accent);
|
||||
}
|
||||
}
|
||||
|
@@ -87,7 +87,7 @@ public class AdaptiveHomepageIconTest {
|
||||
public void setBackgroundColor_externalTileWithBackgroundColorRawValue_shouldUpdateIcon() {
|
||||
final Tile tile = spy(new Tile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE));
|
||||
mActivityInfo.metaData.putInt(META_DATA_PREFERENCE_ICON_BACKGROUND_ARGB, 0xff0000);
|
||||
doReturn(Icon.createWithResource(mContext, R.drawable.ic_settings))
|
||||
doReturn(Icon.createWithResource(mContext, R.drawable.ic_settings_accent))
|
||||
.when(tile).getIcon(mContext);
|
||||
final AdaptiveHomepageIcon icon =
|
||||
new AdaptiveHomepageIcon(mContext, new ColorDrawable(Color.BLACK));
|
||||
@@ -101,7 +101,7 @@ public class AdaptiveHomepageIconTest {
|
||||
final Tile tile = spy(new Tile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE));
|
||||
mActivityInfo.metaData.putInt(META_DATA_PREFERENCE_ICON_BACKGROUND_HINT,
|
||||
R.color.material_blue_500);
|
||||
doReturn(Icon.createWithResource(mContext, R.drawable.ic_settings))
|
||||
doReturn(Icon.createWithResource(mContext, R.drawable.ic_settings_accent))
|
||||
.when(tile).getIcon(mContext);
|
||||
|
||||
final AdaptiveHomepageIcon icon =
|
||||
|
Reference in New Issue
Block a user