| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| ~ Copyright 2019 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. |
| --> |
| <layer-list |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| xmlns:app="http://schemas.android.com/apk/res-auto"> |
| <item> |
| <!-- Shape used to set the size of the overlay drawable --> |
| <shape |
| android:shape="rectangle" |
| android:tint="@android:color/transparent"> |
| <size |
| android:width="@dimen/car_ui_preference_switch_width" |
| android:height="@dimen/car_ui_preference_switch_height"/> |
| </shape> |
| </item> |
| <item |
| android:gravity="center" |
| android:top="0dp" |
| android:bottom="0dp" |
| android:right="0dp" |
| android:left="@dimen/car_ui_preference_switch_width_half"> |
| <drawable |
| class="com.android.car.ui.drawable.CarUiTextDrawable" |
| app:renderedText="@string/car_ui_preference_switch_on" |
| app:textColor="@color/car_ui_preference_switch_track_text_color" |
| app:textSize="@dimen/car_ui_preference_switch_text_size"> |
| </drawable> |
| </item> |
| <item |
| android:gravity="center" |
| android:top="0dp" |
| android:bottom="0dp" |
| android:left="0dp" |
| android:right="@dimen/car_ui_preference_switch_width_half"> |
| <drawable |
| class="com.android.car.ui.drawable.CarUiTextDrawable" |
| app:renderedText="@string/car_ui_preference_switch_off" |
| app:textColor="@color/car_ui_preference_switch_track_text_color" |
| app:textSize="@dimen/car_ui_preference_switch_text_size"> |
| </drawable> |
| </item> |
| </layer-list> |