Home | History | Annotate | Download | only in layout
      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 
     26     <LinearLayout
     27         android:layout_width="match_parent"
     28         android:layout_height="wrap_content"
     29         android:baselineAligned="false"
     30         android:gravity="center_vertical"
     31         android:minHeight="@dimen/list_item_height"
     32         android:orientation="horizontal"
     33         android:paddingEnd="@dimen/list_item_padding"
     34         android:paddingStart="@dimen/list_item_padding" >
     35 
     36         <FrameLayout
     37             android:id="@android:id/icon"
     38             android:pointerIcon="hand"
     39             android:layout_width="@dimen/list_item_thumbnail_size"
     40             android:layout_height="@dimen/list_item_thumbnail_size"
     41             android:layout_marginEnd="16dp" >
     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:contentDescription="@null"
     56                 android:scaleType="centerCrop" />
     57 
     58             <ImageView
     59                 android:id="@+id/icon_check"
     60                 android:layout_width="@dimen/check_icon_size"
     61                 android:layout_height="@dimen/check_icon_size"
     62                 android:layout_gravity="center"
     63                 android:alpha="0"
     64                 android:contentDescription="@null"
     65                 android:scaleType="fitCenter"
     66                 android:src="@drawable/ic_check_circle" />
     67         </FrameLayout>
     68 
     69         <LinearLayout
     70             android:layout_width="0dp"
     71             android:layout_height="wrap_content"
     72             android:layout_weight="1"
     73             android:orientation="vertical"
     74             android:layout_gravity="center_vertical" >
     75 
     76             <TextView
     77                 android:id="@android:id/title"
     78                 android:layout_width="wrap_content"
     79                 android:layout_height="0dp"
     80                 android:layout_weight="1"
     81                 android:ellipsize="end"
     82                 android:singleLine="true"
     83                 android:textAlignment="viewStart"
     84                 android:textAppearance="@android:style/TextAppearance.Material.Subhead"
     85                 android:textColor="@color/item_title" />
     86 
     87             <LinearLayout
     88                 android:id="@+id/line2"
     89                 android:layout_width="match_parent"
     90                 android:layout_height="wrap_content"
     91                 android:baselineAligned="false"
     92                 android:gravity="center_vertical"
     93                 android:orientation="horizontal" >
     94 
     95                 <TextView
     96                     android:id="@+id/date"
     97                     android:layout_width="90dp"
     98                     android:layout_height="wrap_content"
     99                     android:ellipsize="end"
    100                     android:singleLine="true"
    101                     android:textAlignment="viewStart"
    102                     android:textAppearance="@android:style/TextAppearance.Material.Caption"
    103                     android:textColor="@color/item_details" />
    104 
    105                 <TextView
    106                     android:id="@+id/size"
    107                     android:layout_width="90dp"
    108                     android:layout_height="wrap_content"
    109                     android:layout_marginStart="8dp"
    110                     android:ellipsize="end"
    111                     android:singleLine="true"
    112                     android:textAlignment="viewStart"
    113                     android:textAppearance="@android:style/TextAppearance.Material.Caption"
    114                     android:textColor="@color/item_details" />
    115 
    116                 <TextView
    117                     android:id="@+id/file_type"
    118                     android:layout_width="90dp"
    119                     android:layout_height="wrap_content"
    120                     android:layout_marginStart="8dp"
    121                     android:ellipsize="end"
    122                     android:singleLine="true"
    123                     android:textAlignment="viewStart"
    124                     android:textAppearance="@android:style/TextAppearance.Material.Caption"
    125                     android:textColor="@color/item_details" />
    126 
    127                 <TextView
    128                     android:id="@android:id/summary"
    129                     android:layout_width="0dp"
    130                     android:layout_height="wrap_content"
    131                     android:layout_marginStart="8dp"
    132                     android:layout_weight="1"
    133                     android:ellipsize="end"
    134                     android:singleLine="true"
    135                     android:textAlignment="viewStart"
    136                     android:textAppearance="@android:style/TextAppearance.Material.Caption"
    137                     android:textColor="@color/item_details" />
    138             </LinearLayout>
    139         </LinearLayout>
    140     </LinearLayout>
    141 
    142 </LinearLayout>
    143