Merge "Update styling of chips fields."
This commit is contained in:
commit
c165092ea2
@ -14,6 +14,18 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<com.android.email.activity.ChipsAddressTextView
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/EmailRecipientEditTextView" />
|
||||
style="@style/ComposeFieldLinearLayout"
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
<TextView style="@style/ComposeHeading"
|
||||
android:text="@string/message_compose_to_hint"
|
||||
android:id="@+id/label"/>
|
||||
|
||||
<com.android.email.activity.ChipsAddressTextView
|
||||
style="@style/RecipientEditTextView"
|
||||
android:layout_toRightOf="@id/label"
|
||||
android:id="@+id/address_field" />
|
||||
|
||||
</RelativeLayout>
|
@ -14,10 +14,22 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<com.android.email.activity.AddressTextView
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:inputType="textEmailAddress|textMultiLine"
|
||||
android:imeOptions="actionNext"
|
||||
android:layout_weight="1" />
|
||||
style="@style/ComposeFieldLinearLayout"
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
<TextView style="@style/ComposeHeading"
|
||||
android:text="@string/message_compose_to_hint"
|
||||
android:id="@+id/label"/>
|
||||
|
||||
<com.android.email.activity.AddressTextView
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:inputType="textEmailAddress|textMultiLine"
|
||||
android:imeOptions="actionNext"
|
||||
android:layout_weight="1"
|
||||
android:layout_toRightOf="@id/label"
|
||||
android:id="@+id/address_field" />
|
||||
|
||||
</RelativeLayout>
|
@ -39,14 +39,15 @@
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
/>
|
||||
|
||||
<include android:id="@+id/to"
|
||||
layout="@layout/address_text_view"
|
||||
android:layout_width="match_parent"
|
||||
<!-- To -->
|
||||
<FrameLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip" />
|
||||
|
||||
android:layout_marginRight="6dip">
|
||||
<include android:id="@+id/to_content"
|
||||
layout="@layout/address_text_view"/>
|
||||
</FrameLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/cc_bcc_container"
|
||||
android:layout_width="match_parent"
|
||||
@ -54,16 +55,16 @@
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip"
|
||||
>
|
||||
<include android:id="@+id/cc"
|
||||
android:layout_marginRight="6dip">
|
||||
|
||||
<include android:id="@+id/cc_content"
|
||||
layout="@layout/address_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<include android:id="@+id/bcc"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip"/>
|
||||
<include android:id="@+id/bcc_content"
|
||||
layout="@layout/address_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip"/>
|
||||
</LinearLayout>
|
||||
|
||||
<EditText android:id="@+id/subject"
|
||||
|
@ -68,4 +68,7 @@
|
||||
<color name="message_activated_color">#3cb8e6</color>
|
||||
|
||||
<color name="error_bar_background">#ffff66</color>
|
||||
|
||||
<!-- Compose colors -->
|
||||
<color name="compose_label_text">#aaaaaa</color>
|
||||
</resources>
|
||||
|
@ -195,6 +195,27 @@
|
||||
<item name="android:minHeight">48dip</item>
|
||||
</style>
|
||||
|
||||
<style name="ComposeFieldLinearLayout" parent="android:Widget.Holo.Light.EditText">
|
||||
<item name="android:addStatesFromChildren">true</item>
|
||||
<item name="android:focusable">false</item>
|
||||
<item name="android:focusableInTouchMode">false</item>
|
||||
<item name="android:orientation">horizontal</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:paddingLeft">0dip</item>
|
||||
<item name="android:paddingRight">0dip</item>
|
||||
</style>
|
||||
<style name="ComposeHeading">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">32dip</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/compose_label_text</item>
|
||||
<item name="android:paddingLeft">8dip</item>
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
</style>
|
||||
|
||||
<style name="message_list_item_normal">
|
||||
<!-- no styles on phones -->
|
||||
</style>
|
||||
|
@ -662,14 +662,30 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
|
||||
};
|
||||
|
||||
private void initViews() {
|
||||
mToView = UiUtilities.getView(this, R.id.to);
|
||||
mCcView = UiUtilities.getView(this, R.id.cc);
|
||||
mBccView = UiUtilities.getView(this, R.id.bcc);
|
||||
// add hints only when no labels exist
|
||||
if (UiUtilities.getViewOrNull(this, R.id.to_label) == null) {
|
||||
mToView.setHint(R.string.message_compose_to_hint);
|
||||
mCcView.setHint(R.string.message_compose_cc_hint);
|
||||
mBccView.setHint(R.string.message_compose_bcc_hint);
|
||||
ViewGroup toParent = UiUtilities.getViewOrNull(this, R.id.to_content);
|
||||
if (toParent != null) {
|
||||
mToView = (MultiAutoCompleteTextView) toParent.findViewById(R.id.address_field);
|
||||
((TextView) toParent.findViewById(R.id.label))
|
||||
.setText(R.string.message_compose_to_hint);
|
||||
ViewGroup ccParent, bccParent;
|
||||
ccParent = (ViewGroup) findViewById(R.id.cc_content);
|
||||
mCcView = (MultiAutoCompleteTextView) ccParent.findViewById(R.id.address_field);
|
||||
((TextView) ccParent.findViewById(R.id.label))
|
||||
.setText(R.string.message_compose_cc_hint);
|
||||
bccParent = (ViewGroup) findViewById(R.id.bcc_content);
|
||||
mBccView = (MultiAutoCompleteTextView) bccParent.findViewById(R.id.address_field);
|
||||
((TextView) bccParent.findViewById(R.id.label))
|
||||
.setText(R.string.message_compose_bcc_hint);
|
||||
} else {
|
||||
mToView = UiUtilities.getView(this, R.id.to);
|
||||
mCcView = UiUtilities.getView(this, R.id.cc);
|
||||
mBccView = UiUtilities.getView(this, R.id.bcc);
|
||||
// add hints only when no labels exist
|
||||
if (UiUtilities.getViewOrNull(this, R.id.to_label) == null) {
|
||||
mToView.setHint(R.string.message_compose_to_hint);
|
||||
mCcView.setHint(R.string.message_compose_cc_hint);
|
||||
mBccView.setHint(R.string.message_compose_bcc_hint);
|
||||
}
|
||||
}
|
||||
|
||||
mFromView = UiUtilities.getView(this, R.id.from);
|
||||
|
Loading…
Reference in New Issue
Block a user