Update attachment styles.

Part of fixes for b/5517524 compose on tablets needs redlines

Change-Id: I286c6fa57229e993660dd307fc14b929b701b47f
This commit is contained in:
Mindy Pereira 2011-11-03 11:20:47 -07:00
parent 31e5beba35
commit aa90b4f2eb
27 changed files with 193 additions and 283 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1014 B

After

Width:  |  Height:  |  Size: 1014 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 734 B

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<!-- For add attachments and +cc/bcc -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_height="match_parent"
android:layout_width="wrap_content"
style="@style/ComposeButtonColumn">
<LinearLayout android:id="@+id/compose_buttons_spacer"
android:layout_height="0dip"
android:layout_width="match_parent"
android:layout_weight="1" />
<Button android:id="@+id/add_cc_bcc"
android:text="@string/plus_cc_label"
style="@style/ComposeButton"
android:visibility="gone"
android:layout_marginLeft="16dip" />
<ImageView android:id="@+id/add_attachment"
android:text="@string/add_file_attachment"
android:layout_width="32dip"
android:layout_height="32dip"
android:src="@drawable/ic_attachment_holo_light"
android:clickable="true"
android:layout_gravity="center_vertical|left"
android:gravity="left"
android:layout_marginLeft="14dip" />
</LinearLayout>

View File

@ -13,194 +13,148 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- tablet -->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent"
>
<ScrollView
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="16dip"
style="@style/message_compose_scroll"
android:paddingTop="16dip"
android:paddingBottom="16dip"
android:paddingLeft="32dip"
android:paddingRight="32dip"
android:background="#ffffffff"
android:fillViewport="true"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<!-- headers + buttons -->
android:fillViewport="true">
<LinearLayout
android:id="@+id/compose_scrollview"
android:orientation="vertical"
android:layout_width="@dimen/compose_scrollview_width"
android:layout_height="match_parent"
android:paddingTop="8dip"
android:background="@android:color/white"
android:layout_gravity="center_horizontal">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<!-- headers: from/to/cc/bcc/subject -->
<LinearLayout
android:orientation="vertical"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
>
<!-- from: -->
<include layout="@layout/compose_from"/>
<include layout="@layout/compose_area_recipients"/>
</LinearLayout> <!-- end of header -->
<!-- Buttons: +cc/bcc, add attachment -->
<RelativeLayout
android:layout_width="@dimen/message_compose_header_button_area_width"
android:layout_height="match_parent"
android:layout_weight="0"
android:paddingLeft="16dip"
android:layout_gravity="bottom"
>
<Button
android:id="@+id/add_cc_bcc"
android:layout_height="48dip"
android:layout_width="wrap_content"
android:layout_marginTop="48dip"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
style="@android:style/Widget.Holo.Button.Borderless"
android:paddingTop="0dip"
android:paddingBottom="0dip"
android:paddingLeft="0dip"
android:paddingRight="0dip"
android:textSize="18dip"
android:textColor="@color/text_primary_color"
android:text="@string/add_cc_bcc_action"
android:gravity="left|center_vertical"
/>
<ImageButton
android:id="@+id/add_attachment"
android:layout_height="48dip"
android:layout_width="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
style="@android:style/Widget.Holo.Button.Borderless"
android:paddingTop="0dip"
android:paddingBottom="0dip"
android:paddingLeft="0dip"
android:paddingRight="0dip"
android:gravity="left|center_vertical"
android:src="@drawable/ic_attachment_holo_light"
/>
</RelativeLayout> <!-- end of buttons -->
</LinearLayout> <!-- end of headers+buttons -->
<LinearLayout android:id="@+id/attachment_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dip"
android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="gone"
>
<View
android:layout_width="match_parent"
android:layout_marginRight="@dimen/message_compose_header_button_area_width"
style="@style/message_compose_horizontal_divider"
/>
<!--
Empty container for storing attachments. We'll stick
instances of message_compose_attachment.xml in here.
-->
<LinearLayout android:id="@+id/attachments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="112dip"
android:orientation="vertical"
/>
<View
android:layout_width="match_parent"
android:layout_marginRight="@dimen/message_compose_header_button_area_width"
style="@style/message_compose_horizontal_divider"
/>
</LinearLayout>
android:paddingLeft="100dip">
<!-- message body -->
<FrameLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="100dip">
<include layout="@layout/compose_body"/>
</FrameLayout>
<!-- quoted text bar -->
<LinearLayout
android:id="@+id/quoted_text_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<View
android:layout_width="match_parent"
style="@style/message_compose_horizontal_divider"
/>
<LinearLayout
<LinearLayout android:id="@+id/content"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="46dip"
>
<TextView
android:layout_height="wrap_content">
<!-- For the to, cc, bcc, and subject -->
<LinearLayout android:id="@+id/wrapper"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0"
android:layout_marginLeft="16dip"
android:gravity="left|center_vertical"
android:textSize="18dip"
android:textColor="@color/text_secondary_color"
android:text="@string/message_compose_quoted_text_label"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="right|center_vertical"
android:textSize="18dip"
android:textColor="@color/text_primary_color"
android:text="@string/message_compose_include_quoted_text_checkbox_label"
/>
<CheckBox
android:id="@+id/include_quoted_text"
android:layout_width="48dip"
android:layout_height="match_parent"
android:layout_weight="0"
android:gravity="center"
android:layout_height="wrap_content">
<include layout="@layout/compose_from"/>
<include layout="@layout/compose_area_recipients"/>
</LinearLayout>
<include layout="@layout/compose_area_buttons"/>
</LinearLayout>
<!-- Attachments -->
<LinearLayout android:id="@+id/attachment_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
android:orientation="vertical"
android:visibility="gone"
android:layout_marginRight="100dip"
>
<!--
Empty container for storing attachments. We'll stick
instances of message_compose_attachment.xml in here.
-->
<LinearLayout android:id="@+id/attachments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
/>
</LinearLayout>
<View
<!-- Compose Area -->
<FrameLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="100dip">
<include layout="@layout/compose_body"/>
</FrameLayout>
<!-- quoted text bar -->
<LinearLayout
android:id="@+id/quoted_text_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<View
android:layout_width="match_parent"
style="@style/message_compose_horizontal_divider"
/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="46dip"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0"
android:layout_marginLeft="16dip"
android:gravity="left|center_vertical"
android:textSize="18dip"
android:textColor="@color/text_secondary_color"
android:text="@string/message_compose_quoted_text_label"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="right|center_vertical"
android:textSize="18dip"
android:textColor="@color/text_primary_color"
android:text="@string/message_compose_include_quoted_text_checkbox_label"
/>
<CheckBox
android:id="@+id/include_quoted_text"
android:layout_width="48dip"
android:layout_height="match_parent"
android:layout_weight="0"
android:gravity="center"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
style="@style/message_compose_horizontal_divider"
/>
</LinearLayout>
<!--
Quoted text
TODO: Don't put a webview in a scroll view.
-->
<WebView android:id="@+id/quoted_text"
android:layout_height="wrap_content"
android:layout_width="match_parent"
style="@style/message_compose_horizontal_divider"
android:layout_marginTop="16dip"
/>
<View
android:id="@+id/tap_trap"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
/>
<FrameLayout
android:id="@+id/composearea_tap_trap_bottom"
android:layout_weight="1"
android:layout_height="0dip"
android:layout_width="match_parent"
android:clickable="true"/>
</LinearLayout>
<!--
Quoted text
TODO: Don't put a webview in a scroll view.
-->
<WebView android:id="@+id/quoted_text"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_marginTop="16dip"
/>
<View
android:id="@+id/tap_trap"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
/>
</LinearLayout>
</ScrollView>
</FrameLayout>
</LinearLayout>
</ScrollView>

View File

@ -1,93 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<!-- tablet -->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="49dip"
android:layout_marginBottom="-1dip"
>
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_marginRight="@dimen/message_compose_header_button_area_width"
android:layout_alignParentBottom="true"
style="@style/message_compose_horizontal_divider"
/>
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="48dip"
android:layout_marginRight="16dip"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:src="@drawable/ic_attachment_holo_light"
android:gravity="center"
/>
<!--
Use FrameLayout to left-align the button image, within the width of
@dimen/message_compose_header_button_area_width
-->
<FrameLayout
android:id="@+id/attachment_delete_frame"
android:layout_width="@dimen/message_compose_header_button_area_width"
android:layout_height="48dip"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_gravity="center_vertical|left"
>
<ImageButton
android:id="@+id/attachment_delete"
android:layout_width="wrap_content"
android:layout_height="match_parent"
style="@android:style/Widget.Holo.Button.Borderless"
android:src="@drawable/ic_remove_attachment_holo_light"
android:gravity="left|center_vertical"
android:paddingTop="0dip"
android:paddingBottom="0dip"
android:paddingLeft="16dip"
android:paddingRight="0dip"
/>
</FrameLayout>
<TextView
android:id="@+id/attachment_size"
android:layout_width="wrap_content"
android:layout_height="48dip"
android:layout_marginLeft="8dip"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@id/attachment_delete_frame"
android:textSize="14dip"
android:textColor="@color/text_secondary_color"
android:gravity="center_vertical|right"
android:singleLine="true"
/>
<TextView
android:id="@+id/attachment_name"
android:layout_width="0dip"
android:layout_height="48dip"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/icon"
android:layout_toLeftOf="@id/attachment_size"
android:textSize="18dip"
android:textColor="@color/text_secondary_color"
android:gravity="center_vertical|left"
android:singleLine="true"
android:ellipsize="start"
/>
<!-- TODO Show file size -->
</RelativeLayout>

View File

@ -13,10 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- non-xlarge -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="#ffd5d5d5"
style="@style/attachment_container">
<ImageView
@ -25,6 +22,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<!-- Attachment preview -->
<ImageView android:id="@+id/attachment_thumbnail"
style="@style/attachment_thumbnail"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<!-- Attachment name and size -->
<LinearLayout
android:orientation="vertical"
@ -44,8 +47,8 @@
</LinearLayout>
<!-- Remove button -->
<ImageView android:id="@+id/attachment_delete"
android:src="@drawable/ic_remove_attachment_holo_light"
<ImageView android:id="@+id/remove_attachment"
android:src="@drawable/ic_cancel_holo_light"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"

View File

@ -24,7 +24,7 @@
/>
<item
android:id="@+id/add_attachment"
android:title="@string/add_attachment_menu"
android:title="@string/add_file_attachment"
/>
<item
android:id="@+id/add_cc_bcc"

View File

@ -30,4 +30,6 @@
<item name="android:layout_width">360dip</item>
<item name="android:layout_height">match_parent</item>
</style>
<dimen name="compose_scrollview_width">800dip</dimen>
</resources>

View File

@ -41,7 +41,7 @@
<dimen name="message_list_drag_message_font_size">18sp</dimen>
<dimen name="message_list_drag_message_right_margin">16dip</dimen>
<dimen name="message_compose_header_button_area_width">120dip</dimen>
<dimen name="compose_scrollview_width">700dip</dimen>
<!-- Account settings fragments -->
<dimen name="settings_fragment_padding_top">16dip</dimen>

View File

@ -101,11 +101,11 @@
<!-- Menu item for moving messages to folders [CHAR LIMIT=10] -->
<string name="move_action">Move</string>
<!-- Button label for adding CC/BCC fields on message compose. [CHAR LIMIT=16] -->
<string name="add_cc_bcc_action">+ Cc/Bcc</string>
<string name="plus_cc_label">+ Cc/Bcc</string>
<!-- Menu item label for adding CC/BCC fields on message compose. [CHAR LIMIT=20] -->
<string name="add_cc_bcc_menu">Add Cc/Bcc</string>
<!-- Menu item label for adding an attachment on message compose. [CHAR LIMIT=20] -->
<string name="add_attachment_menu">Attach file</string>
<string name="add_file_attachment">Attach file</string>
<!-- Generic button [CHAR LIMIT=16] -->
<string name="close_action">Close</string>
<!-- Command shown on Outbox to send all pending messages [CHAR LIMIT=20] -->

View File

@ -751,7 +751,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
setFocusShifter(R.id.to_label, R.id.to);
setFocusShifter(R.id.cc_label, R.id.cc);
setFocusShifter(R.id.bcc_label, R.id.bcc);
setFocusShifter(R.id.tap_trap, R.id.body_text);
setFocusShifter(R.id.composearea_tap_trap_bottom, R.id.body_text);
mMessageContentView.setOnFocusChangeListener(this);
@ -1615,10 +1615,10 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
// manually are still removable.
final boolean allowDelete = (attachment.mFlags & Attachment.FLAG_SMART_FORWARD) == 0;
View view = getLayoutInflater().inflate(R.layout.message_compose_attachment,
mAttachmentContentView, false);
View view = getLayoutInflater().inflate(R.layout.attachment, mAttachmentContentView,
false);
TextView nameView = UiUtilities.getView(view, R.id.attachment_name);
ImageView delete = UiUtilities.getView(view, R.id.attachment_delete);
ImageView delete = UiUtilities.getView(view, R.id.remove_attachment);
TextView sizeView = UiUtilities.getView(view, R.id.attachment_size);
nameView.setText(attachment.mFileName);
@ -1680,7 +1680,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
return;
}
switch (view.getId()) {
case R.id.attachment_delete:
case R.id.remove_attachment:
onDeleteAttachmentIconClicked(view);
break;
}