| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| ~ Copyright (C) 2017 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. |
| --> |
| <RelativeLayout |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| android:id="@+id/container" |
| android:layout_width="wrap_content" |
| android:layout_height="match_parent" |
| android:foreground="@drawable/car_card_ripple_background"> |
| <!-- Primary Action. --> |
| <ImageView |
| android:id="@+id/primary_icon" |
| android:layout_width="@dimen/car_single_line_list_item_height" |
| android:layout_height="@dimen/car_single_line_list_item_height"/> |
| |
| <!-- Text. --> |
| <TextView |
| android:id="@+id/title" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:singleLine="true" |
| android:ellipsize="end"/> |
| <TextView |
| android:id="@+id/body" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"/> |
| |
| <!-- Supplemental action(s) - only one of the following groups should be visible. --> |
| <!-- End icon with divider. --> |
| <View |
| android:id="@+id/supplemental_icon_divider" |
| android:layout_centerVertical="true" |
| android:layout_toStartOf="@id/supplemental_icon" |
| android:layout_marginEnd="@dimen/car_padding_4" |
| style="@style/CarListVerticalDivider"/> |
| <ImageView |
| android:id="@+id/supplemental_icon" |
| android:background="@drawable/car_button_ripple_background" |
| android:layout_centerVertical="true" |
| android:layout_width="@dimen/car_primary_icon_size" |
| android:layout_height="@dimen/car_primary_icon_size" |
| android:layout_alignParentEnd="true" |
| android:layout_marginEnd="@dimen/car_keyline_1" |
| android:scaleType="fitCenter"/> |
| |
| <!-- Switch with divider. --> |
| <View |
| android:id="@+id/switch_divider" |
| android:layout_centerVertical="true" |
| android:layout_toStartOf="@+id/switch_widget" |
| android:layout_marginEnd="@dimen/car_padding_4" |
| style="@style/CarListVerticalDivider"/> |
| <Switch |
| android:id="@id/switch_widget" |
| android:layout_centerVertical="true" |
| android:layout_width="@dimen/car_primary_icon_size" |
| android:layout_height="@dimen/car_primary_icon_size" |
| android:layout_alignParentEnd="true" |
| android:layout_marginEnd="@dimen/car_keyline_1" |
| style="@android:style/Widget.Material.CompoundButton.Switch"/> |
| |
| <!-- Up to 2 action buttons with dividers. --> |
| <View |
| android:id="@+id/action2_divider" |
| android:layout_centerVertical="true" |
| android:layout_toStartOf="@+id/action2" |
| android:layout_marginEnd="@dimen/car_padding_4" |
| style="@style/CarListVerticalDivider"/> |
| <Button |
| android:id="@id/action2" |
| android:layout_centerVertical="true" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_toStartOf="@+id/action1_divider" |
| android:layout_marginEnd="@dimen/car_padding_4" |
| android:ellipsize="end" |
| android:maxLength="@integer/car_borderless_button_text_length_limit" |
| android:maxLines="1" |
| style="?android:attr/borderlessButtonStyle"/> |
| <View |
| android:id="@id/action1_divider" |
| android:layout_centerVertical="true" |
| android:layout_toStartOf="@+id/action1" |
| android:layout_marginEnd="@dimen/car_padding_4" |
| style="@style/CarListVerticalDivider"/> |
| <Button |
| android:id="@id/action1" |
| android:layout_centerVertical="true" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_alignParentEnd="true" |
| android:layout_marginEnd="@dimen/car_keyline_1" |
| android:ellipsize="end" |
| android:maxLength="@integer/car_borderless_button_text_length_limit" |
| android:maxLines="1" |
| style="?android:attr/borderlessButtonStyle"/> |
| </RelativeLayout> |