• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2010 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<!-- tablet -->
18
19<FrameLayout
20    xmlns:android="http://schemas.android.com/apk/res/android"
21    android:layout_height="match_parent"
22    android:layout_width="match_parent"
23    >
24    <ScrollView
25        android:layout_height="match_parent"
26        android:layout_gravity="center_horizontal"
27        android:layout_marginBottom="16dip"
28        style="@style/message_compose_scroll"
29        android:paddingTop="16dip"
30        android:paddingBottom="16dip"
31        android:paddingLeft="32dip"
32        android:paddingRight="32dip"
33        android:background="#ffffffff"
34        android:fillViewport="true"
35        >
36        <LinearLayout
37            android:orientation="vertical"
38            android:layout_width="match_parent"
39            android:layout_height="match_parent"
40            >
41            <!-- headers + buttons -->
42            <LinearLayout
43                android:orientation="horizontal"
44                android:layout_width="match_parent"
45                android:layout_height="wrap_content"
46                >
47                <!-- headers: from/to/cc/bcc/subject -->
48                <LinearLayout
49                    android:orientation="vertical"
50                    android:layout_width="0dip"
51                    android:layout_height="wrap_content"
52                    android:layout_weight="1"
53                    >
54                    <!-- from: -->
55                    <LinearLayout
56                        style="@style/message_compose_header_field_container_no_tray"
57                        >
58                        <TextView
59                            style="@style/message_compose_header_field_label"
60                            android:text="@string/message_compose_from_label"
61                            />
62                        <TextView
63                            android:id="@+id/from"
64                            style="@style/message_compose_header_field_value"
65                            />
66                    </LinearLayout>
67
68                <include layout="@layout/recipients_area"/>
69
70                <include layout="@layout/compose_subject"/>
71                </LinearLayout> <!-- end of header -->
72
73                <!-- Buttons: +cc/bcc, add attachment -->
74                <RelativeLayout
75                    android:layout_width="@dimen/message_compose_header_button_area_width"
76                    android:layout_height="match_parent"
77                    android:layout_weight="0"
78                    android:paddingLeft="16dip"
79                    android:layout_gravity="bottom"
80                    >
81                    <Button
82                        android:id="@+id/add_cc_bcc"
83                        android:layout_height="48dip"
84                        android:layout_width="wrap_content"
85                        android:layout_marginTop="48dip"
86                        android:layout_alignParentLeft="true"
87                        android:layout_alignParentTop="true"
88                        style="@android:style/Widget.Holo.Button.Borderless"
89                        android:paddingTop="0dip"
90                        android:paddingBottom="0dip"
91                        android:paddingLeft="0dip"
92                        android:paddingRight="0dip"
93                        android:textSize="18dip"
94                        android:textColor="@color/text_primary_color"
95                        android:text="@string/add_cc_bcc_action"
96                        android:gravity="left|center_vertical"
97                        />
98                    <ImageButton
99                        android:id="@+id/add_attachment"
100                        android:layout_height="48dip"
101                        android:layout_width="wrap_content"
102                        android:layout_alignParentLeft="true"
103                        android:layout_alignParentBottom="true"
104                        style="@android:style/Widget.Holo.Button.Borderless"
105                        android:paddingTop="0dip"
106                        android:paddingBottom="0dip"
107                        android:paddingLeft="0dip"
108                        android:paddingRight="0dip"
109                        android:gravity="left|center_vertical"
110                        android:src="@drawable/ic_attachment_holo_light"
111                        />
112                </RelativeLayout> <!-- end of buttons -->
113            </LinearLayout> <!-- end of headers+buttons -->
114
115            <LinearLayout android:id="@+id/attachment_container"
116                android:layout_width="match_parent"
117                android:layout_height="wrap_content"
118                android:layout_marginTop="16dip"
119                android:orientation="vertical"
120                android:visibility="gone"
121                >
122                <View
123                    android:layout_width="match_parent"
124                    android:layout_marginRight="@dimen/message_compose_header_button_area_width"
125                    style="@style/message_compose_horizontal_divider"
126                    />
127                <!--
128                    Empty container for storing attachments. We'll stick
129                    instances of message_compose_attachment.xml in here.
130                -->
131                <LinearLayout android:id="@+id/attachments"
132                    android:layout_width="match_parent"
133                    android:layout_height="wrap_content"
134                    android:layout_marginLeft="112dip"
135                    android:orientation="vertical"
136                    />
137                <View
138                    android:layout_width="match_parent"
139                    android:layout_marginRight="@dimen/message_compose_header_button_area_width"
140                    style="@style/message_compose_horizontal_divider"
141                    />
142            </LinearLayout>
143
144            <!--  message body -->
145            <EditText
146                android:id="@+id/message_content"
147                android:layout_width="match_parent"
148                android:layout_height="wrap_content"
149                android:layout_margin="0dip"
150                android:gravity="top"
151                android:minLines="3"
152                android:hint="@string/message_compose_body_hint"
153                android:inputType="textLongMessage|textMultiLine|textAutoCorrect|textCapSentences"
154                android:imeOptions="actionDone|flagNoEnterAction"
155                style="@style/PlainEditText"
156                android:paddingTop="32dip"
157                android:paddingBottom="32dip"
158                android:paddingLeft="16dip"
159                android:paddingRight="16dip"
160                />
161
162            <!--  quoted text bar -->
163            <LinearLayout
164                android:id="@+id/quoted_text_bar"
165                android:layout_width="match_parent"
166                android:layout_height="wrap_content"
167                android:orientation="vertical"
168                >
169                <View
170                    android:layout_width="match_parent"
171                    style="@style/message_compose_horizontal_divider"
172                    />
173                <LinearLayout
174                    android:orientation="horizontal"
175                    android:layout_width="match_parent"
176                    android:layout_height="46dip"
177                    >
178                    <TextView
179                        android:layout_width="wrap_content"
180                        android:layout_height="match_parent"
181                        android:layout_weight="0"
182                        android:layout_marginLeft="16dip"
183                        android:gravity="left|center_vertical"
184                        android:textSize="18dip"
185                        android:textColor="@color/text_secondary_color"
186                        android:text="@string/message_compose_quoted_text_label"
187                        />
188                    <TextView
189                        android:layout_width="wrap_content"
190                        android:layout_height="match_parent"
191                        android:layout_weight="1"
192                        android:gravity="right|center_vertical"
193                        android:textSize="18dip"
194                        android:textColor="@color/text_primary_color"
195                        android:text="@string/message_compose_include_quoted_text_checkbox_label"
196                        />
197                    <CheckBox
198                        android:id="@+id/include_quoted_text"
199                        android:layout_width="48dip"
200                        android:layout_height="match_parent"
201                        android:layout_weight="0"
202                        android:gravity="center"
203                        />
204                </LinearLayout>
205                <View
206                    android:layout_width="match_parent"
207                    style="@style/message_compose_horizontal_divider"
208                    />
209            </LinearLayout>
210            <!--
211                Quoted text
212                TODO: Don't put a webview in a scroll view.
213            -->
214            <WebView android:id="@+id/quoted_text"
215                android:layout_height="wrap_content"
216                android:layout_width="match_parent"
217                android:layout_marginTop="16dip"
218                />
219            <View
220                android:id="@+id/tap_trap"
221                android:layout_width="match_parent"
222                android:layout_height="0dip"
223                android:layout_weight="1"
224                />
225        </LinearLayout>
226    </ScrollView>
227</FrameLayout>
228