Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3     Copyright (C) 2019 The Android Open Source Project
      4 
      5     Licensed under the Apache License, Version 2.0 (the "License");
      6     you may not use this file except in compliance with the License.
      7     You may obtain a copy of the License at
      8 
      9         http://www.apache.org/licenses/LICENSE-2.0
     10 
     11     Unless required by applicable law or agreed to in writing, software
     12     distributed under the License is distributed on an "AS IS" BASIS,
     13     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14     See the License for the specific language governing permissions and
     15     limitations under the License.
     16 -->
     17 
     18 <RelativeLayout
     19     xmlns:android="http://schemas.android.com/apk/res/android"
     20     android:layout_width="match_parent"
     21     android:layout_height="wrap_content"
     22     android:background="@color/car_volume_dialog_background_color"
     23     android:paddingStart="@dimen/car_volume_item_padding_start"
     24     android:paddingEnd="@dimen/car_volume_item_padding_end"
     25     android:minHeight="@dimen/car_volume_item_height">
     26 
     27     <!-- Primary Action. -->
     28     <ImageView
     29         android:id="@+id/primary_icon"
     30         android:layout_width="@dimen/car_volume_item_icon_size"
     31         android:layout_centerVertical="true"
     32         android:layout_alignParentStart="true"
     33         android:layout_height="@dimen/car_volume_item_icon_size"/>
     34 
     35     <!-- Note: the horizontal padding and offset are set to 0 so that the track and thumb
     36              aligns with the proper keylines. -->
     37     <SeekBar
     38         android:id="@+id/seek_bar"
     39         android:layout_width="match_parent"
     40         android:layout_height="wrap_content"
     41         android:layout_marginBottom="@dimen/car_volume_item_seekbar_margin_vertical"
     42         android:layout_marginTop="@dimen/car_volume_item_seekbar_margin_vertical"
     43         android:min="0"
     44         android:paddingBottom="@dimen/car_volume_item_seekbar_padding_vertical"
     45         android:layout_centerVertical="true"
     46         android:paddingEnd="0dp"
     47         android:paddingStart="0dp"
     48         android:paddingTop="@dimen/car_volume_item_seekbar_padding_vertical"
     49         android:splitTrack="false"
     50         android:layout_toStartOf="@id/supplemental_icon_divider"
     51         android:layout_marginStart="@dimen/car_volume_item_seekbar_margin_start"
     52         android:layout_marginEnd="@dimen/car_volume_item_seekbar_margin_end"
     53         android:thumbOffset="0dp"/>
     54 
     55     <!-- Supplemental action. -->
     56     <View
     57         android:id="@+id/supplemental_icon_divider"
     58         android:layout_width="@dimen/car_volume_item_divider_width"
     59         android:layout_height="@dimen/car_volume_item_divider_height"
     60         android:layout_marginEnd="@dimen/car_volume_item_divider_margin_end"
     61         android:layout_centerVertical="true"
     62         android:layout_toStartOf="@id/supplemental_icon"
     63         android:background="@color/car_volume_item_divider_color"/>
     64     <ImageView
     65         android:id="@+id/supplemental_icon"
     66         android:layout_width="@dimen/car_volume_item_icon_size"
     67         android:layout_height="@dimen/car_volume_item_icon_size"
     68         android:background="?android:attr/selectableItemBackground"
     69         android:layout_centerVertical="true"
     70         android:layout_alignParentEnd="true"
     71         android:scaleType="fitCenter"/>
     72 </RelativeLayout>
     73