Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2013 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 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     18     android:layout_width="match_parent"
     19     android:layout_height="@dimen/grid_item_height"
     20     android:background="@color/item_doc_grid_background">
     21 
     22     <ImageView
     23         android:id="@+id/icon_thumb"
     24         android:layout_width="match_parent"
     25         android:layout_height="match_parent"
     26         android:scaleType="centerCrop"
     27         android:contentDescription="@null" />
     28 
     29     <LinearLayout
     30         android:layout_width="match_parent"
     31         android:layout_height="match_parent"
     32         android:orientation="vertical">
     33 
     34         <ImageView
     35             android:id="@+id/icon_mime"
     36             android:layout_width="match_parent"
     37             android:layout_height="0dp"
     38             android:layout_weight="1"
     39             android:scaleType="centerInside"
     40             android:contentDescription="@null" />
     41 
     42         <LinearLayout
     43             android:layout_width="match_parent"
     44             android:layout_height="wrap_content"
     45             android:background="@color/item_doc_grid_protect_background"
     46             android:orientation="vertical"
     47             android:paddingStart="16dp"
     48             android:paddingEnd="12dp"
     49             android:paddingTop="8dp"
     50             android:paddingBottom="8dp">
     51 
     52             <LinearLayout
     53                 android:id="@+id/line1"
     54                 android:layout_width="match_parent"
     55                 android:layout_height="wrap_content"
     56                 android:gravity="center_vertical"
     57                 android:orientation="horizontal"
     58                 android:baselineAligned="false">
     59 
     60                 <TextView
     61                     android:id="@android:id/title"
     62                     android:layout_width="0dp"
     63                     android:layout_height="wrap_content"
     64                     android:layout_weight="1"
     65                     android:singleLine="true"
     66                     android:ellipsize="middle"
     67                     android:textAlignment="viewStart"
     68                     android:textAppearance="@android:style/TextAppearance.Material.Subhead"
     69                     android:textColor="@*android:color/primary_text_default_material_dark" />
     70 
     71                 <ImageView
     72                     android:id="@android:id/icon1"
     73                     android:layout_width="@dimen/root_icon_size"
     74                     android:layout_height="@dimen/root_icon_size"
     75                     android:layout_marginStart="8dp"
     76                     android:scaleType="centerInside"
     77                     android:contentDescription="@null" />
     78 
     79             </LinearLayout>
     80 
     81             <LinearLayout
     82                 android:id="@+id/line2"
     83                 android:layout_width="match_parent"
     84                 android:layout_height="wrap_content"
     85                 android:gravity="center_vertical"
     86                 android:orientation="horizontal"
     87                 android:baselineAligned="false">
     88 
     89                 <TextView
     90                     android:id="@+id/date"
     91                     android:layout_width="0dp"
     92                     android:layout_height="wrap_content"
     93                     android:layout_weight="0.5"
     94                     android:singleLine="true"
     95                     android:ellipsize="end"
     96                     android:textAlignment="viewStart"
     97                     android:textAppearance="@android:style/TextAppearance.Material.Caption"
     98                     android:textColor="@*android:color/primary_text_default_material_dark" />
     99 
    100                 <TextView
    101                     android:id="@+id/size"
    102                     android:layout_width="0dp"
    103                     android:layout_height="wrap_content"
    104                     android:layout_weight="0.5"
    105                     android:layout_marginStart="8dp"
    106                     android:singleLine="true"
    107                     android:ellipsize="end"
    108                     android:textAlignment="viewStart"
    109                     android:textAppearance="@android:style/TextAppearance.Material.Caption"
    110                     android:textColor="@*android:color/primary_text_default_material_dark" />
    111 
    112                 <ImageView
    113                     android:id="@android:id/icon2"
    114                     android:layout_width="@dimen/root_icon_size"
    115                     android:layout_height="@dimen/root_icon_size"
    116                     android:layout_marginStart="8dp"
    117                     android:scaleType="centerInside"
    118                     android:contentDescription="@null"
    119                     android:visibility="gone" />
    120 
    121             </LinearLayout>
    122 
    123         </LinearLayout>
    124 
    125     </LinearLayout>
    126 
    127     <ImageView
    128         android:layout_width="match_parent"
    129         android:layout_height="match_parent"
    130         android:src="@drawable/item_doc_grid_overlay"
    131         android:contentDescription="@null"
    132         android:duplicateParentState="true" />
    133 
    134     <ImageView
    135         android:layout_width="match_parent"
    136         android:layout_height="match_parent"
    137         android:src="@drawable/item_doc_grid_overlay_icon"
    138         android:scaleType="center"
    139         android:contentDescription="@null"
    140         android:duplicateParentState="true" />
    141 
    142 </FrameLayout>
    143