Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3      Copyright (C) 2012 Google Inc.
      4      Licensed to The Android Open Source Project.
      5 
      6      Licensed under the Apache License, Version 2.0 (the "License");
      7      you may not use this file except in compliance with the License.
      8      You may obtain a copy of the License at
      9 
     10           http://www.apache.org/licenses/LICENSE-2.0
     11 
     12      Unless required by applicable law or agreed to in writing, software
     13      distributed under the License is distributed on an "AS IS" BASIS,
     14      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15      See the License for the specific language governing permissions and
     16      limitations under the License.
     17 -->
     18 <com.android.mail.compose.ComposeAttachmentTile
     19     xmlns:android="http://schemas.android.com/apk/res/android"
     20     android:id="@+id/attachment_tile"
     21     android:layout_width="wrap_content"
     22     android:layout_height="wrap_content"
     23     android:background="@drawable/attachment_bg_holo"
     24     android:focusable="true"
     25     android:focusableInTouchMode="true">
     26 
     27     <include layout="@layout/attachment_preview"/>
     28 
     29     <RelativeLayout
     30         android:layout_width="match_parent"
     31         android:layout_height="wrap_content"
     32         android:background="@color/attachment_tile_shadow_box_color"
     33         android:layout_alignParentBottom="true"
     34         android:gravity="center_vertical"
     35         android:paddingLeft="8dip">
     36 
     37         <LinearLayout
     38             android:layout_width="match_parent"
     39             android:layout_height="wrap_content"
     40             android:layout_alignParentLeft="true"
     41             android:layout_toLeftOf="@+id/attachment_tile_close_button"
     42             android:orientation="vertical"
     43             android:gravity="center_vertical"
     44             android:layout_centerVertical="true"
     45             android:paddingRight="4dip">
     46 
     47             <TextView
     48                 android:id="@+id/attachment_tile_title"
     49                 android:layout_width="wrap_content"
     50                 android:layout_height="wrap_content"
     51                 android:textColor="@android:color/white"
     52                 android:includeFontPadding="false"
     53                 android:textSize="16sp"
     54                 android:singleLine="true"
     55                 android:fadingEdge="horizontal"
     56                 android:fadingEdgeLength="3dip"
     57                 android:ellipsize="marquee" />
     58 
     59             <TextView
     60                 android:id="@+id/attachment_tile_subtitle"
     61                 android:layout_width="wrap_content"
     62                 android:layout_height="wrap_content"
     63                 android:textAppearance="?android:attr/textAppearanceSmall"
     64                 android:textColor="@android:color/white"
     65                 android:includeFontPadding="false"
     66                 android:textSize="12sp"
     67                 android:singleLine="true"
     68                 android:fadingEdge="horizontal"
     69                 android:fadingEdgeLength="3dip"
     70                 android:ellipsize="marquee" />
     71 
     72         </LinearLayout>
     73 
     74         <ImageButton
     75             android:id="@id/attachment_tile_close_button"
     76             android:src="@drawable/ic_attach_cancel"
     77             android:layout_width="44dip"
     78             android:layout_height="44dip"
     79             android:gravity="center"
     80             android:focusable="true"
     81             android:background="?android:attr/selectableItemBackground"
     82             android:layout_alignParentRight="true" />
     83 
     84     </RelativeLayout>
     85 
     86 </com.android.mail.compose.ComposeAttachmentTile>
     87