summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/drawable-hdpi/ic_cancel_holo_light.pngbin0 -> 393 bytes
-rw-r--r--res/drawable-mdpi/ic_cancel_holo_light.pngbin0 -> 312 bytes
-rw-r--r--res/drawable/attachment_background.xml33
-rw-r--r--res/layout-v14/compose_from.xml28
-rw-r--r--res/layout/compose_from.xml23
-rw-r--r--res/layout/message_compose.xml9
-rw-r--r--res/layout/message_compose_attachment.xml75
-rw-r--r--res/values/styles.xml23
-rw-r--r--src/com/android/email/activity/MessageCompose.java4
9 files changed, 146 insertions, 49 deletions
diff --git a/res/drawable-hdpi/ic_cancel_holo_light.png b/res/drawable-hdpi/ic_cancel_holo_light.png
new file mode 100644
index 000000000..d8cacb44a
--- /dev/null
+++ b/res/drawable-hdpi/ic_cancel_holo_light.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_cancel_holo_light.png b/res/drawable-mdpi/ic_cancel_holo_light.png
new file mode 100644
index 000000000..56705c333
--- /dev/null
+++ b/res/drawable-mdpi/ic_cancel_holo_light.png
Binary files differ
diff --git a/res/drawable/attachment_background.xml b/res/drawable/attachment_background.xml
new file mode 100644
index 000000000..559d33fa7
--- /dev/null
+++ b/res/drawable/attachment_background.xml
@@ -0,0 +1,33 @@
+<?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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_selected="true">
+ <shape type="rectangle">
+ <solid android:color="#ffffaf00" />
+ <corners android:radius="8dp" />
+ </shape>
+ <stroke android:width="2dip" android:color="#ff000000" />
+ </item>
+
+ <item android:state_selected="false">
+ <shape type="rectangle">
+ <solid android:color="#ff444444" />
+ <corners android:radius="8dp" />
+ </shape>
+ <stroke android:width="2dip" android:color="#ff000000" />
+ </item>
+</selector>
diff --git a/res/layout-v14/compose_from.xml b/res/layout-v14/compose_from.xml
new file mode 100644
index 000000000..813b13fd0
--- /dev/null
+++ b/res/layout-v14/compose_from.xml
@@ -0,0 +1,28 @@
+<?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.
+-->
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/RecipientComposeFieldLayout">
+ <TextView
+ android:id="@+id/from"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:background="@null"
+ android:paddingLeft="8dip"
+ android:paddingBottom="16dip"
+ android:paddingTop="16dip"
+ />
+</RelativeLayout> \ No newline at end of file
diff --git a/res/layout/compose_from.xml b/res/layout/compose_from.xml
new file mode 100644
index 000000000..964ea9dda
--- /dev/null
+++ b/res/layout/compose_from.xml
@@ -0,0 +1,23 @@
+<?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.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/from"
+ style="?android:attr/editTextStyle"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="?android:attr/textColorSecondary"
+ /> \ No newline at end of file
diff --git a/res/layout/message_compose.xml b/res/layout/message_compose.xml
index 9f4d04f64..ec14a639b 100644
--- a/res/layout/message_compose.xml
+++ b/res/layout/message_compose.xml
@@ -31,14 +31,7 @@
android:layout_height="wrap_content">
<!-- Not actually editable -->
- <TextView
- android:id="@+id/from"
- style="?android:attr/editTextStyle"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- />
+ <include layout="@layout/compose_from"/>
<include layout="@layout/recipients_area"/>
diff --git a/res/layout/message_compose_attachment.xml b/res/layout/message_compose_attachment.xml
index 09ad40110..8bd0dc858 100644
--- a/res/layout/message_compose_attachment.xml
+++ b/res/layout/message_compose_attachment.xml
@@ -15,46 +15,43 @@
-->
<!-- non-xlarge -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:background="#ffd5d5d5"
+ style="@style/attachment_container">
-<RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="54dip"
- android:paddingRight="6dip"
- android:paddingTop="6dip"
- android:paddingBottom="6dip">
- <ImageButton
- android:id="@+id/attachment_delete"
- android:src="@drawable/ic_remove_attachment_holo_light"
- android:layout_alignParentRight="true"
- android:layout_height="42dip"
- android:layout_width="42dip" />
- <TextView
- android:id="@+id/attachment_name"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondaryInverse"
- android:layout_width="1dip"
- android:layout_height="42dip"
- android:background="@drawable/text_box"
- android:paddingLeft="36dip"
- android:singleLine="true"
- android:ellipsize="start"
- android:gravity="center_vertical"
- android:layout_marginLeft="6dip"
- android:layout_marginRight="4dip"
- android:layout_alignParentLeft="true"
- android:layout_toLeftOf="@id/attachment_delete" />
<ImageView
+ android:src="@drawable/ic_attachment_holo_light"
+ android:layout_gravity="center_vertical"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+ <!-- Attachment name and size -->
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_weight="1.0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:src="@drawable/ic_attachment_holo_light"
- android:layout_marginLeft="1dip"
- android:layout_centerVertical="true" />
- <!-- Dummy view to keep it compatible with xlarge. -->
- <TextView
- android:id="@+id/attachment_size"
- android:layout_width="0dip"
- android:layout_height="0dip"
- android:visibility="gone"
- />
-</RelativeLayout>
+ android:layout_gravity="center_vertical">
+
+ <TextView android:id="@+id/attachment_name"
+ style="@style/attachment_name" />
+
+ <TextView android:id="@+id/attachment_size"
+ style="@style/attachment_name"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ </LinearLayout>
+
+ <!-- Remove button -->
+ <ImageView android:id="@+id/attachment_delete"
+ android:src="@drawable/ic_cancel_holo_light"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="left"
+ android:layout_marginLeft="20dip"
+ android:layout_gravity="center_vertical|left"
+ android:clickable="true" />
+
+
+</LinearLayout>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 4c8d4dbdc..3561579cc 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -121,6 +121,29 @@
<item name="android:singleLine">true</item>
</style>
+ <style name="attachment_container">
+ <item name="android:background">@drawable/attachment_background</item>
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:orientation">horizontal</item>
+ </style>
+
+ <style name="attachment_name">
+ <item name="android:id">@id/attachment_name</item>
+ <item name="android:paddingLeft">5dip</item>
+ <item name="android:maxLines">1</item>
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:textColor">@color/text_primary_color</item>
+ </style>
+
+ <style name="attachment_thumbnail">
+ <item name="android:layout_gravity">center_vertical</item>
+ <item name="android:paddingLeft">5dip</item>
+ <item name="android:layout_width">32dip</item>
+ <item name="android:layout_height">32dip</item>
+ </style>
+
<style name="action_bar_custom_view">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
diff --git a/src/com/android/email/activity/MessageCompose.java b/src/com/android/email/activity/MessageCompose.java
index d7b2c47a5..c5296eebf 100644
--- a/src/com/android/email/activity/MessageCompose.java
+++ b/src/com/android/email/activity/MessageCompose.java
@@ -51,7 +51,7 @@ import android.webkit.WebView;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.EditText;
-import android.widget.ImageButton;
+import android.widget.ImageView;
import android.widget.MultiAutoCompleteTextView;
import android.widget.TextView;
import android.widget.Toast;
@@ -1599,7 +1599,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
View view = getLayoutInflater().inflate(R.layout.message_compose_attachment,
mAttachmentContentView, false);
TextView nameView = UiUtilities.getView(view, R.id.attachment_name);
- ImageButton delete = UiUtilities.getView(view, R.id.attachment_delete);
+ ImageView delete = UiUtilities.getView(view, R.id.attachment_delete);
TextView sizeView = UiUtilities.getView(view, R.id.attachment_size);
nameView.setText(attachment.mFileName);