Home | History | Annotate | Download | only in layout-sw720dp-land
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3      Copyright (C) 2013 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 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     19     android:layout_width="match_parent"
     20     android:layout_height="wrap_content"
     21     android:background="@drawable/list_item_background"
     22     android:focusable="true"
     23     android:orientation="horizontal" >
     24 
     25     <LinearLayout
     26         android:layout_width="match_parent"
     27         android:layout_height="wrap_content"
     28         android:baselineAligned="false"
     29         android:gravity="center_vertical"
     30         android:minHeight="@dimen/list_item_height"
     31         android:orientation="horizontal"
     32         android:paddingEnd="@dimen/list_item_padding"
     33         android:paddingStart="@dimen/list_item_padding" >
     34 
     35         <FrameLayout
     36             android:id="@android:id/icon"
     37             android:pointerIcon="hand"
     38             android:layout_width="@dimen/list_item_thumbnail_size"
     39             android:layout_height="@dimen/list_item_thumbnail_size"
     40             android:layout_marginEnd="16dp"
     41             android:layout_marginStart="0dp" >
     42 
     43             <ImageView
     44                 android:id="@+id/icon_mime"
     45                 android:layout_width="wrap_content"
     46                 android:layout_height="wrap_content"
     47                 android:layout_gravity="center"
     48                 android:contentDescription="@null"
     49                 android:scaleType="centerInside" />
     50 
     51             <ImageView
     52                 android:id="@+id/icon_thumb"
     53                 android:layout_width="match_parent"
     54                 android:layout_height="match_parent"
     55                 android:layout_gravity="center"
     56                 android:contentDescription="@null"
     57                 android:scaleType="centerCrop" />
     58 
     59             <ImageView
     60                 android:id="@+id/icon_check"
     61                 android:layout_width="@dimen/check_icon_size"
     62                 android:layout_height="@dimen/check_icon_size"
     63                 android:layout_gravity="center"
     64                 android:alpha="0"
     65                 android:contentDescription="@null"
     66                 android:scaleType="fitCenter"
     67                 android:src="@drawable/ic_check_circle" />
     68 
     69         </FrameLayout>
     70 
     71         <!-- This is the one special case where we want baseline alignment! -->
     72 
     73         <LinearLayout
     74             android:layout_width="0dp"
     75             android:layout_height="wrap_content"
     76             android:layout_weight="1"
     77             android:orientation="horizontal" >
     78 
     79             <TextView
     80                 android:id="@android:id/title"
     81                 android:layout_width="0dp"
     82                 android:layout_height="wrap_content"
     83                 android:layout_marginEnd="12dp"
     84                 android:layout_weight="0.375"
     85                 android:ellipsize="middle"
     86                 android:singleLine="true"
     87                 android:textAlignment="viewStart"
     88                 android:textAppearance="@android:style/TextAppearance.Material.Subhead"
     89                 android:textColor="?android:attr/textColorPrimary" />
     90 
     91             <TextView
     92                 android:id="@android:id/summary"
     93                 android:layout_width="0dp"
     94                 android:layout_height="wrap_content"
     95                 android:layout_marginEnd="12dp"
     96                 android:layout_weight="0.25"
     97                 android:ellipsize="end"
     98                 android:singleLine="true"
     99                 android:textAlignment="viewStart"
    100                 android:textAppearance="@android:style/TextAppearance.Material.Body1"
    101                 android:textColor="?android:attr/textColorSecondary" />
    102 
    103             <TextView
    104                 android:id="@+id/file_type"
    105                 android:layout_width="0dp"
    106                 android:layout_height="wrap_content"
    107                 android:layout_marginEnd="12dp"
    108                 android:layout_weight="0.125"
    109                 android:ellipsize="end"
    110                 android:singleLine="true"
    111                 android:textAlignment="viewStart"
    112                 android:textAppearance="@android:style/TextAppearance.Material.Body1"
    113                 android:textColor="?android:attr/textColorSecondary" />
    114 
    115             <TextView
    116                 android:id="@+id/size"
    117                 android:layout_width="0dp"
    118                 android:layout_height="wrap_content"
    119                 android:layout_marginEnd="12dp"
    120                 android:layout_weight="0.125"
    121                 android:ellipsize="end"
    122                 android:minWidth="70dp"
    123                 android:singleLine="true"
    124                 android:textAlignment="viewEnd"
    125                 android:textAppearance="@android:style/TextAppearance.Material.Body1"
    126                 android:textColor="?android:attr/textColorSecondary" />
    127 
    128             <TextView
    129                 android:id="@+id/date"
    130                 android:layout_width="0dp"
    131                 android:layout_height="wrap_content"
    132                 android:layout_marginEnd="12dp"
    133                 android:layout_weight="0.125"
    134                 android:ellipsize="end"
    135                 android:minWidth="70dp"
    136                 android:singleLine="true"
    137                 android:textAlignment="viewEnd"
    138                 android:textAppearance="@android:style/TextAppearance.Material.Body1"
    139                 android:textColor="?android:attr/textColorSecondary" />
    140         </LinearLayout>
    141     </LinearLayout>
    142 
    143 </LinearLayout>
    144