Style Email compose to look like gmail compose.
Change-Id: I8e1f0e9c4bbbbcd2463473da190bff88f2748905
This commit is contained in:
parent
5b5a9b3f9e
commit
7b41b374cc
|
@ -0,0 +1,21 @@
|
|||
<?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">
|
||||
<EditText android:id="@+id/subject"
|
||||
style="@style/ChipsComposeSubjectStyle"
|
||||
/>
|
||||
</RelativeLayout>
|
|
@ -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.
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/RecipientComposeFieldLayout">
|
||||
|
||||
<EditText android:id="@+id/message_content"
|
||||
style="@style/ChipsComposeBodyStyle"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
|
@ -17,9 +17,7 @@
|
|||
automatically saved by framework.-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip">
|
||||
android:layout_width="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
style="@style/RecipientComposeFieldLayout"
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<?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.
|
||||
-->
|
||||
<EditText xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/subject"
|
||||
style="@style/ComposeSubjectStyle"
|
||||
/>
|
|
@ -18,15 +18,17 @@
|
|||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_height="match_parent" android:layout_width="match_parent"
|
||||
android:orientation="vertical" android:background="#ffffff">
|
||||
android:orientation="vertical">
|
||||
<ScrollView android:layout_width="match_parent"
|
||||
android:layout_height="0dip" android:layout_weight="1"
|
||||
android:fillViewport="true">
|
||||
android:fillViewport="true"
|
||||
android:paddingLeft="16dip"
|
||||
android:paddingRight="16dip">
|
||||
<LinearLayout android:orientation="vertical"
|
||||
android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<LinearLayout android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" android:background="#ededed">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- Not actually editable -->
|
||||
<TextView
|
||||
|
@ -34,26 +36,13 @@
|
|||
style="?android:attr/editTextStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
/>
|
||||
|
||||
<include layout="@layout/recipients_area"/>
|
||||
|
||||
<EditText android:id="@+id/subject"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:hint="@string/message_compose_subject_hint"
|
||||
android:inputType
|
||||
="textEmailSubject|textAutoCorrect|textCapSentences|textMultiLine"
|
||||
android:imeOptions="actionNext|flagNoExtractUi"
|
||||
/>
|
||||
<include layout="@layout/compose_subject"/>
|
||||
|
||||
<!--
|
||||
Empty container for storing attachments. We'll stick
|
||||
|
@ -72,20 +61,10 @@
|
|||
/>
|
||||
<View android:layout_width="match_parent"
|
||||
android:layout_height="1dip"
|
||||
android:background="@drawable/divider_horizontal_email" />
|
||||
android:background="@drawable/divider_horizontal_email"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
<EditText android:id="@+id/message_content"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="top"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:minLines="3"
|
||||
android:hint="@string/message_compose_body_hint"
|
||||
android:inputType="textMultiLine|textAutoCorrect|textCapSentences"
|
||||
android:imeOptions="actionDone|flagNoEnterAction|flagNoExtractUi"
|
||||
/>
|
||||
<include layout="@layout/message_compose_body"/>
|
||||
<!-- quoted text bar -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/quoted_text_bar"
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<?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.
|
||||
-->
|
||||
<EditText xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/message_content"
|
||||
style="@style/ComposeBodyStyle"
|
||||
/>
|
|
@ -22,4 +22,16 @@
|
|||
<item name="android:layout_marginBottom">2dip</item>
|
||||
<item name="android:layout_marginTop">2dip</item>
|
||||
</style>
|
||||
<style name="ChipsComposeBodyStyle" parent="@style/ComposeBodyStyle">
|
||||
<item name="android:minHeight">0dip</item>
|
||||
<item name="android:background">@null</item>
|
||||
<item name="android:paddingBottom">12dip</item>
|
||||
<item name="android:paddingTop">8dip</item>
|
||||
</style>
|
||||
<style name="ChipsComposeSubjectStyle" parent="@style/ComposeSubjectStyle">
|
||||
<item name="android:minHeight">0dip</item>
|
||||
<item name="android:background">@null</item>
|
||||
<item name="android:paddingBottom">12dip</item>
|
||||
<item name="android:paddingTop">8dip</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -231,6 +231,31 @@
|
|||
<item name="android:paddingBottom">8dip</item>
|
||||
</style>
|
||||
|
||||
<style name="ComposeBodyStyle">
|
||||
<item name="android:paddingTop">0dip</item>
|
||||
<item name="android:minHeight">48dip</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="android:inputType">textLongMessage|textMultiLine|textAutoCorrect|textCapSentences</item>
|
||||
<item name="android:hint">@string/message_compose_body_hint</item>
|
||||
<item name="android:imeOptions">flagNoExtractUi|actionDone|flagNoEnterAction</item>
|
||||
<item name="android:paddingLeft">8dip</item>
|
||||
<item name="android:textColorHint">@color/compose_label_text</item>
|
||||
</style>
|
||||
|
||||
<style name="ComposeSubjectStyle">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
|
||||
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||
<item name="android:textColorHint">@color/compose_label_text</item>
|
||||
<item name="android:hint">@string/message_compose_subject_hint</item>
|
||||
<item name="android:inputType">textEmailSubject|textAutoCorrect|textCapSentences|textMultiLine</item>
|
||||
<item name="android:imeOptions">actionNext|flagNoExtractUi</item>
|
||||
<item name="android:paddingLeft">8dip</item>
|
||||
</style>
|
||||
|
||||
<style name="message_list_item_normal">
|
||||
<!-- no styles on phones -->
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue