Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2014 The Android Open Source Project
      3 
      4      Licensed under the Apache License, Version 2.0 (the "License");
      5      you may not use this file except in compliance with the License.
      6      You may obtain a copy of the License at
      7 
      8           http://www.apache.org/licenses/LICENSE-2.0
      9 
     10      Unless required by applicable law or agreed to in writing, software
     11      distributed under the License is distributed on an "AS IS" BASIS,
     12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13      See the License for the specific language governing permissions and
     14      limitations under the License.
     15 -->
     16 
     17 <!-- Header at the top of a raw contact editor. This is clickable to expand/collapse the editor. -->
     18 <LinearLayout
     19     xmlns:android="http://schemas.android.com/apk/res/android"
     20     android:id="@+id/account_header_container"
     21     android:layout_height="wrap_content"
     22     android:layout_width="match_parent"
     23     android:background="?android:attr/selectableItemBackground"
     24     android:paddingStart="16dp"
     25     android:focusable="true"
     26     >
     27 
     28     <!-- TODO: consider making this a new style, like EditKindIconStyle -->
     29     <ImageView
     30         android:id="@android:id/icon"
     31         android:layout_width="@dimen/editor_kind_icon_size"
     32         android:layout_height="@dimen/editor_kind_icon_size"
     33         android:layout_marginEnd="28dp"
     34         android:layout_gravity="center_vertical"
     35         />
     36 
     37     <LinearLayout
     38         android:id="@+id/account_info"
     39         android:layout_height="wrap_content"
     40         android:layout_width="match_parent"
     41         android:layout_weight="1"
     42         android:paddingBottom="@dimen/editor_account_header_expandable_top_bottom_padding"
     43         android:paddingTop="@dimen/editor_account_header_expandable_top_bottom_padding"
     44         android:orientation="vertical"
     45         >
     46 
     47         <TextView
     48             android:id="@+id/account_type"
     49             android:layout_width="match_parent"
     50             android:layout_height="wrap_content"
     51             android:textSize="16sp"
     52             android:singleLine="true"
     53             android:textColor="@color/primary_text_color"
     54             android:ellipsize="end"
     55             android:textAlignment="viewStart"
     56             />
     57 
     58         <TextView
     59             android:id="@+id/account_name"
     60             android:layout_width="match_parent"
     61             android:layout_height="wrap_content"
     62             android:textSize="14sp"
     63             android:singleLine="true"
     64             android:textColor="@color/secondary_text_color"
     65             android:ellipsize="end"
     66             android:textAlignment="viewStart"
     67             />
     68 
     69     </LinearLayout>
     70 
     71     <ImageView
     72         android:id="@+id/expand_account_button"
     73         android:layout_width="wrap_content"
     74         android:layout_height="wrap_content"
     75         android:layout_weight="0"
     76         android:layout_gravity="center_vertical|end"
     77         android:clickable="false"
     78         android:paddingLeft="@dimen/editor_round_button_padding_left"
     79         android:paddingRight="@dimen/editor_round_button_padding_right"
     80         android:paddingStart="@dimen/editor_round_button_padding_left"
     81         android:paddingEnd="@dimen/editor_round_button_padding_right"
     82         android:paddingTop="@dimen/editor_round_button_padding_top"
     83         android:paddingBottom="@dimen/editor_round_button_padding_bottom"
     84         />
     85 
     86 </LinearLayout>