Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2008 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
     18     xmlns:android="http://schemas.android.com/apk/res/android"
     19     android:layout_width="match_parent"
     20     android:layout_height="wrap_content"
     21     android:paddingBottom="4dip">
     22     <LinearLayout
     23         android:layout_width="match_parent"
     24         android:layout_height="wrap_content"
     25         android:paddingLeft="4dip">
     26         <RelativeLayout
     27             android:layout_width="match_parent"
     28             android:layout_height="wrap_content"
     29             android:background="@drawable/text_box"
     30             android:gravity="center_vertical">
     31             <ImageView
     32                 android:id="@+id/attachment_icon"
     33                 android:layout_width="62dip"
     34                 android:layout_height="62dip"
     35                 android:src="@drawable/attached_image_placeholder"
     36                 android:layout_marginLeft="4dip"
     37                 android:layout_marginRight="4dip"
     38                 android:layout_marginBottom="4dip"
     39                 android:layout_marginTop="4dip" />
     40             <TextView
     41                 android:id="@+id/attachment_name"
     42                 android:layout_width="wrap_content"
     43                 android:layout_height="wrap_content"
     44                 android:textAppearance="?android:attr/textAppearanceMedium"
     45                 android:textColor="?android:attr/textColorSecondaryInverse"
     46                 android:singleLine="true"
     47                 android:ellipsize="middle"
     48                 android:layout_alignParentTop="true"
     49                 android:layout_toRightOf="@id/attachment_icon"
     50                 android:layout_alignParentRight="true"
     51                 android:layout_alignWithParentIfMissing="true" />
     52             <TextView
     53                 android:id="@+id/attachment_info"
     54                 android:layout_width="wrap_content"
     55                 android:layout_height="wrap_content"
     56                 android:textAppearance="?android:attr/textAppearanceSmall"
     57                 android:textColor="?android:attr/textColorTertiaryInverse"
     58                 android:singleLine="true"
     59                 android:ellipsize="middle"
     60                 android:layout_alignLeft="@id/attachment_name"
     61                 android:layout_below="@id/attachment_name"
     62                 android:layout_alignWithParentIfMissing="true" />
     63             <Button
     64                 android:id="@+id/download"
     65                 android:layout_width="wrap_content"
     66                 android:layout_height="wrap_content"
     67                 style="?android:attr/buttonStyleSmall"
     68                 android:text="@string/message_view_attachment_download_action"
     69                 android:singleLine="true"
     70                 android:layout_alignParentRight="true"
     71                 android:layout_below="@id/attachment_name"
     72                 android:layout_marginTop="6dip" />
     73             <Button
     74                 android:id="@+id/view"
     75                 android:layout_width="wrap_content"
     76                 android:layout_height="wrap_content"
     77                 style="?android:attr/buttonStyleSmall"
     78                 android:text="@string/message_view_attachment_view_action"
     79                 android:singleLine="true"
     80                 android:layout_toLeftOf="@id/download"
     81                 android:layout_alignWithParentIfMissing="true"
     82                 android:layout_below="@id/attachment_name"
     83                 android:layout_marginTop="6dip" />
     84         </RelativeLayout>
     85     </LinearLayout>
     86     <LinearLayout
     87         android:layout_width="wrap_content"
     88         android:layout_height="match_parent"
     89         android:layout_gravity="center_vertical">
     90         <ImageView
     91             android:layout_height="wrap_content"
     92             android:layout_width="wrap_content"
     93             android:src="@drawable/ic_email_attachment"
     94             android:layout_alignParentLeft="true" />
     95     </LinearLayout>
     96 </FrameLayout>
     97