Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3   ~ Copyright (C) 2018 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="@dimen/car_app_bar_height"
     22     android:layout_gravity="top">
     23 
     24     <FrameLayout
     25         android:id="@+id/action_bar_icon_container"
     26         android:layout_width="@dimen/car_margin"
     27         android:layout_height="match_parent"
     28         android:layout_alignParentStart="true"
     29         android:background="@drawable/button_ripple_bg">
     30         <ImageView
     31             android:id="@+id/exit_button"
     32             android:layout_gravity="center"
     33             android:src="@drawable/ic_close"
     34             style="@style/ListIcon.ActionBar"/>
     35     </FrameLayout>
     36 
     37     <TextView
     38         android:id="@+id/title"
     39         android:layout_width="wrap_content"
     40         android:layout_height="match_parent"
     41         android:layout_marginEnd="@dimen/car_keyline_1"
     42         android:layout_toEndOf="@id/action_bar_icon_container"
     43         android:gravity="center_vertical"
     44         android:textAppearance="@style/TextAppearance.Car.Title2"/>
     45 
     46     <LinearLayout
     47         android:id="@+id/button_container"
     48         android:layout_width="wrap_content"
     49         android:layout_height="match_parent"
     50         android:layout_alignParentEnd="true"
     51         android:layout_marginEnd="@dimen/car_keyline_1"
     52         android:orientation="horizontal">
     53 
     54         <LinearLayout
     55             android:id="@+id/user_switcher_btn"
     56             android:layout_width="wrap_content"
     57             android:layout_height="match_parent"
     58             android:layout_gravity="center_vertical"
     59             android:layout_marginEnd="@dimen/car_padding_4"
     60             android:background="@drawable/button_ripple_bg"
     61             style="@style/Widget.Car.Settings.ActionBar.Button.Borderless.Colored"
     62             android:orientation="horizontal">
     63             <ImageView
     64                 android:id="@+id/user_icon"
     65                 android:src="@drawable/ic_user"
     66                 android:background="@null"
     67                 android:layout_width="@dimen/car_primary_icon_size"
     68                 android:layout_height="@dimen/car_primary_icon_size"
     69                 android:layout_centerVertical="true"
     70                 android:gravity="center_vertical"
     71                 android:scaleType="fitCenter" />
     72             <TextView
     73                 android:id="@+id/user_switcher_text"
     74                 android:layout_width="wrap_content"
     75                 android:layout_height="wrap_content"
     76                 android:layout_gravity="center_vertical"
     77                 android:background="@null"
     78                 android:textAppearance="@style/TextAppearance.Car.Label1"
     79                 android:layout_marginStart="@dimen/car_padding_2"
     80                 android:layout_marginEnd="@dimen/car_padding_2"/>
     81         </LinearLayout>
     82         <LinearLayout
     83             android:id="@+id/full_setting_btn"
     84             android:layout_width="wrap_content"
     85             android:layout_height="match_parent"
     86             android:layout_gravity="center_vertical"
     87             android:layout_marginEnd="@dimen/car_padding_4"
     88             android:background="@drawable/button_ripple_bg"
     89             style="@style/Widget.Car.Settings.ActionBar.Button.Borderless.Colored"
     90             android:orientation="horizontal">
     91             <ImageView
     92                 android:src="@drawable/ic_settings_gear"
     93                 android:background="@null"
     94                 style="@style/ListIcon"/>
     95             <TextView
     96                 android:layout_width="wrap_content"
     97                 android:layout_height="wrap_content"
     98                 android:layout_gravity="center_vertical"
     99                 android:text="@string/more_settings_label"
    100                 android:textAppearance="@style/TextAppearance.Car.Label1"
    101                 android:background="@null"
    102                 android:layout_marginStart="@dimen/car_padding_2"
    103                 android:layout_marginEnd="@dimen/car_padding_2"/>
    104         </LinearLayout>
    105     </LinearLayout>
    106 </RelativeLayout>
    107