Skip to content

Commit 773641f

Browse files
TreeHugger RobotAndroid (Google) Code Review
authored andcommitted
Merge "Update rotary highlight on bordered buttons" into rvc-qpr-dev
2 parents 2ca34ba + 8f65d7d commit 773641f

1 file changed

Lines changed: 37 additions & 13 deletions

File tree

core/res/res/drawable-car/car_button_background.xml

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,48 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
-->
16-
<!-- Default background styles for car buttons when enabled/disabled. -->
17-
<ripple
18-
xmlns:android="http://schemas.android.com/apk/res/android"
19-
android:color="?android:attr/colorControlHighlight">
16+
<!-- Default background styles for car buttons when enabled/disabled,
17+
focused/unfocused, and pressed/unpressed -->
18+
<!-- TODO(b/175161842) Add rotary fill color -->
19+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
20+
<item android:state_focused="true" android:state_enabled="false">
21+
<shape android:shape="rectangle">
22+
<corners android:radius="@*android:dimen/car_button_radius"/>
23+
<solid android:color="@*android:color/car_grey_300"/>
24+
<stroke android:width="8dp"
25+
android:color="#0059B3"/>
26+
</shape>
27+
</item>
28+
<item android:state_focused="true" android:state_pressed="true">
29+
<shape android:shape="rectangle">
30+
<corners android:radius="@*android:dimen/car_button_radius"/>
31+
<solid android:color="?android:attr/colorButtonNormal"/>
32+
<stroke android:width="4dp"
33+
android:color="#0059B3"/>
34+
</shape>
35+
</item>
36+
<item android:state_focused="true">
37+
<shape android:shape="rectangle">
38+
<corners android:radius="@*android:dimen/car_button_radius"/>
39+
<solid android:color="?android:attr/colorButtonNormal"/>
40+
<stroke android:width="8dp"
41+
android:color="#0059B3"/>
42+
</shape>
43+
</item>
44+
<item android:state_enabled="false">
45+
<shape android:shape="rectangle">
46+
<corners android:radius="@*android:dimen/car_button_radius"/>
47+
<solid android:color="@*android:color/car_grey_300"/>
48+
</shape>
49+
</item>
2050
<item>
21-
<selector>
22-
<item android:state_enabled="false">
23-
<shape android:shape="rectangle">
24-
<corners android:radius="@*android:dimen/car_button_radius"/>
25-
<solid android:color="@*android:color/car_grey_300"/>
26-
</shape>
27-
</item>
51+
<ripple android:color="?android:attr/colorControlHighlight">
2852
<item>
2953
<shape android:shape="rectangle">
3054
<corners android:radius="@*android:dimen/car_button_radius"/>
3155
<solid android:color="?android:attr/colorButtonNormal"/>
3256
</shape>
3357
</item>
34-
</selector>
58+
</ripple>
3559
</item>
36-
</ripple>
60+
</selector>

0 commit comments

Comments
 (0)