Make subject in actionbar smaller.
Make the Alice's change to Email this time:
https://googleplex-android-review.googlesource.com/#/c/269629/1
Bug: 8124338 Email message text in action bar seems larger
Change-Id: I96a0b62d1226174d0dd47b99b1ab83e512f07bec
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 009924e..3156219 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -138,6 +138,11 @@
<item name="android:layout_height">match_parent</item>
</style>
+ <style name="subject_action_bar_title_text" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
+ <item name="android:textColor">#323232</item>
+ <item name="android:textSize">16dp</item>
+ </style>
+
<style name="message_view_text">
<item name="android:textSize">14dip</item>
<item name="android:textColor">@color/text_secondary_color</item>
diff --git a/src/com/android/email/activity/ActionBarController.java b/src/com/android/email/activity/ActionBarController.java
index 7ff1ee8..adb1b1b 100644
--- a/src/com/android/email/activity/ActionBarController.java
+++ b/src/com/android/email/activity/ActionBarController.java
@@ -24,7 +24,10 @@
import android.database.Cursor;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
+import android.text.SpannableString;
+import android.text.SpannableStringBuilder;
import android.text.TextUtils;
+import android.text.style.TextAppearanceSpan;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -471,7 +474,16 @@
if (mTitleMode == Callback.TITLE_MODE_MESSAGE_SUBJECT) {
// Use two line title action bar mode
enterMultiLineTitleActionBarMode();
- mActionBar.setTitle(mCallback.getMessageSubject());
+ String subject = mCallback.getMessageSubject();
+ if (subject == null) {
+ subject = "";
+ }
+ final SpannableString title = new SpannableString(subject);
+ final SpannableStringBuilder builder = new SpannableStringBuilder();
+ title.setSpan(new TextAppearanceSpan(mContext, R.style.subject_action_bar_title_text),
+ 0, subject.length(), 0);
+ builder.append(title);
+ mActionBar.setTitle(builder);
mActionBar.setSubtitle(null);
} else if (mTitleMode == Callback.TITLE_MODE_ACCOUNT_WITH_ALL_FOLDERS_LABEL) {
enterSingleLineTitleActionBarMode();