Xml文件  |  96行  |  3.72 KB

<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2012 Google Inc.
     Licensed to The Android Open Source Project.

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<com.android.mail.browse.MessageAttachmentBar xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="12dp"
    android:background="@drawable/attachment_bg_holo"
    android:minHeight="48dip" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/attachment_icon"
            android:layout_width="48dip"
            android:layout_height="match_parent"
            android:background="@color/attachment_image_background_color"
            android:scaleType="center"
            android:src="@drawable/ic_menu_attachment_holo_light"
            style="@style/MessageAttachmentBarMarginEndStyle" />

        <RelativeLayout
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_weight="1" >

            <TextView
                android:id="@+id/attachment_title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:singleLine="true"
                android:textAlignment="viewStart"
                android:textColor="#333333"
                android:textSize="14sp"
                style="@style/MessageAttachmentBarMarginEndStyle" />

            <TextView
                android:id="@+id/attachment_subtitle"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/attachment_title"
                android:ellipsize="end"
                android:singleLine="true"
                android:textAlignment="viewStart"
                android:textColor="#aaaaaa"
                android:textSize="12sp"
                style="@style/MessageAttachmentBarMarginEndStyle" />

            <include layout="@layout/conversation_message_attachment_bar_progress_bar"/>
        </RelativeLayout>

        <ImageView
            android:id="@+id/overflow"
            style="@style/OverflowButtonStyle"
            android:layout_width="48dip"
            android:layout_height="match_parent" />

        <ImageButton
            android:id="@+id/cancel_attachment"
            android:layout_width="48dip"
            android:layout_height="match_parent"
            android:background="?android:attr/selectableItemBackground"
            android:clickable="true"
            android:scaleType="center"
            android:src="@drawable/ic_cancel_holo_light"
            android:visibility="gone" />
    </LinearLayout>

    <View
        android:id="@+id/attachment_push_state"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="?android:attr/selectableItemBackground"
        android:focusable="true" />

</com.android.mail.browse.MessageAttachmentBar>