Update visuals for new fonts.

- tighten up action bar spinner
- fix up message list senders/padding

Bug: 5159050
Change-Id: I00033d994a23f7fbb81cd72f53b9d66faa7570f9
This commit is contained in:
Ben Komalo 2011-08-12 15:01:51 -07:00
parent 526fadbaa0
commit 4b75ac992d
6 changed files with 33 additions and 16 deletions

View File

@ -27,6 +27,8 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_centerVertical="true"
android:paddingTop="0dip"
android:paddingBottom="0dip"
android:focusable="true"
>
<TextView

View File

@ -58,7 +58,6 @@
android:orientation="vertical"
android:paddingRight="16dip"
android:paddingBottom="15dip"
android:paddingLeft="8dip"
>
<View
android:id="@+id/color_chip"

View File

@ -38,9 +38,10 @@
<style name="action_bar_spinner_secondary_text">
<item name="android:includeFontPadding">false</item>
<item name="android:textSize">12sp</item>
<item name="android:textColor">@color/text_primary_color</item>
<item name="android:textColor">@color/text_secondary_color</item>
<item name="android:singleLine">true</item>
<item name="android:ellipsize">end</item>
<item name="android:layout_marginTop">-2dip</item>
</style>
<style name="EmailRecipientEditTextView" parent="@style/RecipientEditTextView">

View File

@ -66,7 +66,7 @@
<dimen name="account_spinner_dropdown_width">300dip</dimen>
<!-- MessageListItem -->
<dimen name="senders_font_size">16sp</dimen>
<dimen name="senders_font_size">18sp</dimen>
<dimen name="wide_senders_font_size">16sp</dimen>
<dimen name="subject_font_size">14sp</dimen>
<dimen name="wide_subject_font_size">16sp</dimen>

View File

@ -178,10 +178,11 @@
</style>
<style name="action_bar_spinner_secondary_text">
<item name="android:textSize">12sp</item>
<item name="android:textColor">@color/text_primary_color</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">@color/text_secondary_color</item>
<item name="android:singleLine">true</item>
<item name="android:ellipsize">end</item>
<item name="android:layout_marginTop">-4dip</item>
</style>
<style name="search_header">

View File

@ -480,19 +480,33 @@ public class ActionBarController {
boolean spinnerEnabled =
((mTitleMode & TITLE_MODE_SPINNER_ENABLED) != 0) && mCursor.shouldEnableSpinner();
if (spinnerEnabled) {
if (!mAccountSpinner.isEnabled()) {
mAccountSpinner.setEnabled(true);
mAccountSpinner.setBackgroundDrawable(mAccountSpinnerDefaultBackground);
}
} else {
if (mAccountSpinner.isEnabled()) {
mAccountSpinner.setEnabled(false);
mAccountSpinner.setBackgroundDrawable(null);
}
}
setSpinnerEnabled(spinnerEnabled);
}
private void setSpinnerEnabled(boolean enabled) {
if (enabled == mAccountSpinner.isEnabled()) {
return;
}
mAccountSpinner.setEnabled(enabled);
if (enabled) {
mAccountSpinner.setBackgroundDrawable(mAccountSpinnerDefaultBackground);
} else {
mAccountSpinner.setBackgroundDrawable(null);
}
// For some reason, changing the background mucks with the padding so we have to manually
// reset vertical padding here (also specified in XML, but it seems to be ignored for
// some reason.
mAccountSpinner.setPadding(
mAccountSpinner.getPaddingLeft(),
0,
mAccountSpinner.getPaddingRight(),
0);
}
private final SearchView.OnQueryTextListener mOnQueryText
= new SearchView.OnQueryTextListener() {
@Override