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:layout_margin="@dimen/grid_item_margin"
     22     android:orientation="vertical"
     23     android:background="@color/item_doc_background"
     24     android:elevation="@dimen/grid_item_elevation"
     25     android:focusable="true">
     26 
     27     <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     28         android:layout_width="match_parent"
     29         android:layout_height="wrap_content"
     30         android:duplicateParentState="true">
     31 
     32         <!-- The height is 48px.
     33              paddingTop (9dp) + @dimen/check_icon_size (30dp) + paddingBottom (9dp) -->
     34         <LinearLayout
     35             android:layout_width="match_parent"
     36             android:layout_height="match_parent"
     37             android:orientation="horizontal"
     38             android:paddingBottom="9dp"
     39             android:paddingLeft="9dp"
     40             android:paddingRight="12dp"
     41             android:paddingTop="9dp"
     42             android:gravity="center_vertical">
     43 
     44             <FrameLayout
     45                 android:layout_width="wrap_content"
     46                 android:layout_height="wrap_content"
     47                 android:layout_marginEnd="8dp" >
     48 
     49                 <ImageView
     50                     android:id="@+id/icon_mime_sm"
     51                     android:layout_width="wrap_content"
     52                     android:layout_height="wrap_content"
     53                     android:layout_gravity="center"
     54                     android:contentDescription="@null"
     55                     android:scaleType="centerInside"
     56                     android:src="@drawable/ic_doc_folder" />
     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:alpha="0"
     63                     android:contentDescription="@null"
     64                     android:scaleType="fitCenter"
     65                     android:src="@drawable/ic_check_circle" />
     66 
     67             </FrameLayout>
     68 
     69             <TextView
     70                 android:id="@android:id/title"
     71                 android:layout_width="wrap_content"
     72                 android:layout_height="wrap_content"
     73                 android:ellipsize="end"
     74                 android:singleLine="true"
     75                 android:textAlignment="viewStart"
     76                 android:textAppearance="@android:style/TextAppearance.Material.Subhead"
     77                 android:textColor="@color/item_title" />
     78 
     79         </LinearLayout>
     80 
     81         <!-- An overlay that draws the item border when it is focused. -->
     82 
     83         <View
     84             android:layout_width="match_parent"
     85             android:layout_height="match_parent"
     86             android:background="@drawable/item_doc_grid_border"
     87             android:contentDescription="@null"
     88             android:duplicateParentState="true" />
     89 
     90     </FrameLayout>
     91 
     92     <FrameLayout
     93         android:id="@+id/debug_info"
     94         android:layout_width="match_parent"
     95         android:layout_height="wrap_content"
     96         android:background="#FFEFEFEF" />
     97 
     98 </LinearLayout>