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_height"
     20     android:background="@drawable/item_doc_grid"
     21     android:foreground="@drawable/item_background">
     22 
     23     <LinearLayout
     24         android:layout_width="match_parent"
     25         android:layout_height="match_parent"
     26         android:paddingBottom="6dp"
     27         android:orientation="vertical">
     28 
     29         <FrameLayout
     30             android:layout_width="match_parent"
     31             android:layout_height="0dp"
     32             android:layout_weight="1"
     33             android:layout_marginBottom="6dp"
     34             android:background="#fff"
     35             android:foreground="@drawable/ic_grid_gradient_bg"
     36             android:foregroundGravity="fill">
     37 
     38             <ImageView
     39                 android:id="@+id/icon_mime"
     40                 android:layout_width="match_parent"
     41                 android:layout_height="match_parent"
     42                 android:scaleType="centerInside"
     43                 android:contentDescription="@null" />
     44 
     45             <ImageView
     46                 android:id="@+id/icon_thumb"
     47                 android:layout_width="match_parent"
     48                 android:layout_height="match_parent"
     49                 android:scaleType="centerCrop"
     50                 android:contentDescription="@null" />
     51 
     52         </FrameLayout>
     53 
     54         <LinearLayout
     55             android:id="@+id/line1"
     56             android:layout_width="match_parent"
     57             android:layout_height="wrap_content"
     58             android:gravity="center_vertical"
     59             android:orientation="horizontal"
     60             android:baselineAligned="false"
     61             android:paddingStart="?android:attr/listPreferredItemPaddingStart"
     62             android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
     63 
     64             <TextView
     65                 android:id="@android:id/title"
     66                 android:layout_width="0dp"
     67                 android:layout_height="wrap_content"
     68                 android:layout_weight="1"
     69                 android:singleLine="true"
     70                 android:ellipsize="middle"
     71                 android:textAlignment="viewStart"
     72                 style="@style/TextAppearance.Medium" />
     73 
     74             <ImageView
     75                 android:id="@android:id/icon1"
     76                 android:layout_width="@dimen/root_icon_size"
     77                 android:layout_height="@dimen/root_icon_size"
     78                 android:layout_marginStart="8dp"
     79                 android:scaleType="centerInside"
     80                 android:contentDescription="@null" />
     81 
     82         </LinearLayout>
     83 
     84         <LinearLayout
     85             android:id="@+id/line2"
     86             android:layout_width="match_parent"
     87             android:layout_height="wrap_content"
     88             android:gravity="center_vertical"
     89             android:orientation="horizontal"
     90             android:baselineAligned="false"
     91             android:paddingStart="?android:attr/listPreferredItemPaddingStart"
     92             android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
     93 
     94             <TextView
     95                 android:id="@+id/date"
     96                 android:layout_width="0dp"
     97                 android:layout_height="wrap_content"
     98                 android:layout_weight="0.5"
     99                 android:singleLine="true"
    100                 android:ellipsize="end"
    101                 android:textAlignment="viewStart"
    102                 style="@style/TextAppearance.Small" />
    103 
    104             <TextView
    105                 android:id="@+id/size"
    106                 android:layout_width="0dp"
    107                 android:layout_height="wrap_content"
    108                 android:layout_weight="0.5"
    109                 android:layout_marginStart="8dp"
    110                 android:singleLine="true"
    111                 android:ellipsize="end"
    112                 android:textAlignment="viewStart"
    113                 style="@style/TextAppearance.Small" />
    114 
    115             <ImageView
    116                 android:id="@android:id/icon2"
    117                 android:layout_width="@dimen/root_icon_size"
    118                 android:layout_height="@dimen/root_icon_size"
    119                 android:layout_marginStart="8dp"
    120                 android:scaleType="centerInside"
    121                 android:contentDescription="@null"
    122                 android:visibility="gone" />
    123 
    124         </LinearLayout>
    125 
    126     </LinearLayout>
    127 
    128 </FrameLayout>
    129