diff options
| author | 2011-08-31 11:42:02 -0700 | |
|---|---|---|
| committer | 2011-08-31 11:42:02 -0700 | |
| commit | ac73e4bb420dbda31a866f3b86b207c71ecfa2f6 (patch) | |
| tree | a313e560a57fea802ab43ed1d445af53baa7b073 | |
| parent | 2a62b43e671ef893e606292e82bc9fb9a09a3bf5 (diff) | |
| parent | 07a047fdd632e10d29a513bf7f175e1edbbb65ab (diff) | |
Merge "Fix bug 5220390 - action bar title metrics"
| -rw-r--r-- | core/java/com/android/internal/widget/ActionBarView.java | 11 | ||||
| -rw-r--r-- | core/res/res/layout/action_bar_title_item.xml | 4 | ||||
| -rw-r--r-- | core/res/res/values-land/dimens.xml | 4 | ||||
| -rw-r--r-- | core/res/res/values-sw600dp/dimens.xml | 4 | ||||
| -rw-r--r-- | core/res/res/values/dimens.xml | 4 |
5 files changed, 26 insertions, 1 deletions
diff --git a/core/java/com/android/internal/widget/ActionBarView.java b/core/java/com/android/internal/widget/ActionBarView.java index ff26d5030ffd..63b027411f16 100644 --- a/core/java/com/android/internal/widget/ActionBarView.java +++ b/core/java/com/android/internal/widget/ActionBarView.java @@ -266,6 +266,17 @@ public class ActionBarView extends AbsActionBarView { if (mActionMenuPresenter != null) { mActionMenuPresenter.onConfigurationChanged(newConfig); } + + mTitleView = null; + mSubtitleView = null; + mTitleUpView = null; + if (mTitleLayout != null && mTitleLayout.getParent() == this) { + removeView(mTitleLayout); + } + mTitleLayout = null; + if ((mDisplayOptions & ActionBar.DISPLAY_SHOW_TITLE) != 0) { + initTitle(); + } } @Override diff --git a/core/res/res/layout/action_bar_title_item.xml b/core/res/res/layout/action_bar_title_item.xml index 08284023e1fc..4c74f6a08cd2 100644 --- a/core/res/res/layout/action_bar_title_item.xml +++ b/core/res/res/layout/action_bar_title_item.xml @@ -16,7 +16,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:orientation="horizontal" android:paddingRight="16dip" android:background="?android:attr/actionBarItemBackground" @@ -41,6 +41,8 @@ <TextView android:id="@+id/action_bar_subtitle" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginTop="@dimen/action_bar_subtitle_top_margin" + android:layout_marginBottom="@dimen/action_bar_subtitle_bottom_margin" android:singleLine="true" android:ellipsize="end" android:visibility="gone" /> diff --git a/core/res/res/values-land/dimens.xml b/core/res/res/values-land/dimens.xml index 02bb3c82c437..6f96852450f2 100644 --- a/core/res/res/values-land/dimens.xml +++ b/core/res/res/values-land/dimens.xml @@ -35,6 +35,10 @@ <dimen name="action_bar_title_text_size">16dp</dimen> <!-- Text size for action bar subtitles --> <dimen name="action_bar_subtitle_text_size">12dp</dimen> + <!-- Top margin for action bar subtitles --> + <dimen name="action_bar_subtitle_top_margin">-2dp</dimen> + <!-- Bottom margin for action bar subtitles --> + <dimen name="action_bar_subtitle_bottom_margin">4dip</dimen> <!-- Size of clock font in LockScreen on Unsecure unlock screen. --> <dimen name="keyguard_lockscreen_clock_font_size">70sp</dimen> diff --git a/core/res/res/values-sw600dp/dimens.xml b/core/res/res/values-sw600dp/dimens.xml index 792066efa99c..2daaaa296b49 100644 --- a/core/res/res/values-sw600dp/dimens.xml +++ b/core/res/res/values-sw600dp/dimens.xml @@ -37,6 +37,10 @@ <dimen name="action_bar_title_text_size">18dp</dimen> <!-- Text size for action bar subtitles --> <dimen name="action_bar_subtitle_text_size">14dp</dimen> + <!-- Top margin for action bar subtitles --> + <dimen name="action_bar_subtitle_top_margin">-3dp</dimen> + <!-- Bottom margin for action bar subtitles --> + <dimen name="action_bar_subtitle_bottom_margin">9dip</dimen> <!-- Size of clock font in LockScreen. --> <dimen name="keyguard_pattern_unlock_clock_font_size">98sp</dimen> diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index 62a2187ea072..2753eab9a31d 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -146,6 +146,10 @@ <dimen name="action_bar_title_text_size">18dp</dimen> <!-- Text size for action bar subtitles --> <dimen name="action_bar_subtitle_text_size">14dp</dimen> + <!-- Top margin for action bar subtitles --> + <dimen name="action_bar_subtitle_top_margin">-3dp</dimen> + <!-- Bottom margin for action bar subtitles --> + <dimen name="action_bar_subtitle_bottom_margin">5dip</dimen> <!-- Size of clock font in LockScreen on Unsecure unlock screen. --> <dimen name="keyguard_lockscreen_clock_font_size">80sp</dimen> |