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 <!-- phone -->
     18 <!--
     19   TODO Remove the default visibility and always set them from code.
     20 -->
     21 
     22 <LinearLayout
     23     xmlns:android="http://schemas.android.com/apk/res/android"
     24     android:layout_width="match_parent"
     25     android:layout_height="wrap_content"
     26     android:orientation="vertical"
     27     android:divider="?android:attr/dividerHorizontal"
     28     android:showDividers="middle"
     29     android:background="@drawable/attachment_bg_holo"
     30     >
     31     <RelativeLayout
     32         android:layout_width="match_parent"
     33         android:layout_height="wrap_content"
     34         android:gravity="center_vertical"
     35         >
     36         <FrameLayout
     37             android:id="@+id/attachment_container"
     38             android:layout_width="48dip"
     39             android:layout_height="48dip"
     40             android:background="#e5e5e5"
     41             >
     42             <ImageView
     43                 android:id="@+id/attachment_icon"
     44                 android:layout_width="match_parent"
     45                 android:layout_height="match_parent"
     46                 android:src="@drawable/ic_attachment_holo_light"
     47                 android:scaleType="center"
     48                 />
     49             <ProgressBar
     50                 android:id="@+id/progress"
     51                 android:layout_width="match_parent"
     52                 android:layout_height="wrap_content"
     53                 android:padding="0dip"
     54                 style="?android:attr/progressBarStyleHorizontal"
     55                 android:max="100"
     56                 android:visibility="invisible"
     57                 />
     58         </FrameLayout>
     59         <TextView
     60             android:id="@+id/attachment_name"
     61             android:layout_width="wrap_content"
     62             android:layout_height="wrap_content"
     63             android:layout_toRightOf="@+id/attachment_container"
     64             android:layout_marginLeft="16dip"
     65             android:textAppearance="?android:attr/textAppearanceSmall"
     66             android:textColor="#333333"
     67             android:singleLine="true"
     68             android:ellipsize="middle"
     69             />
     70         <TextView
     71             android:id="@+id/attachment_info"
     72             android:layout_width="match_parent"
     73             android:layout_height="match_parent"
     74             android:layout_toRightOf="@+id/attachment_container"
     75             android:layout_below="@+id/attachment_name"
     76             android:layout_marginLeft="16dip"
     77             android:textAppearance="?android:attr/textAppearanceSmall"
     78             android:textColor="@color/text_secondary_color"
     79             android:singleLine="true"
     80             android:ellipsize="middle"
     81             />
     82     </RelativeLayout>
     83     <LinearLayout
     84         android:layout_width="match_parent"
     85         android:layout_height="wrap_content"
     86         android:orientation="horizontal"
     87         android:divider="?android:attr/dividerVertical"
     88         android:showDividers="middle"
     89         android:dividerPadding="8dip"
     90         >
     91         <Button
     92             android:id="@+id/load"
     93             style="@style/Attachment.Button"
     94             android:text="@string/message_view_attachment_load_action"
     95             android:visibility="gone"
     96             />
     97         <Button
     98             android:id="@+id/cancel"
     99             style="@style/Attachment.Button"
    100             android:text="@string/message_view_attachment_cancel_action"
    101             android:visibility="gone"
    102             />
    103         <Button
    104             android:id="@+id/info"
    105             style="@style/Attachment.Button"
    106             android:text="@string/message_view_attachment_info_action"
    107             android:visibility="gone"
    108             />
    109         <Button
    110             android:id="@+id/save"
    111             style="@style/Attachment.Button"
    112             android:text="@string/message_view_attachment_save_action"
    113             android:visibility="gone"
    114             />
    115         <Button
    116             android:id="@+id/open"
    117             style="@style/Attachment.Button"
    118             android:text="@string/message_view_attachment_view_action"
    119             android:visibility="gone"
    120             />
    121     </LinearLayout>
    122 </LinearLayout>
    123