summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adam Powell <adamp@google.com> 2011-01-16 19:55:21 -0800
committer Adam Powell <adamp@google.com> 2011-01-16 19:55:21 -0800
commit8f68f4fe79f29334e3d822564733c349622c05a8 (patch)
tree392750c677a178836c55cb4cfb041b5070c3eeab
parente7218240ab1e52de0f7d16c72b0a5b87679427a1 (diff)
Fix bug 3360882 - Allow FEATURE_CUSTOM_TITLE and
FEATURE_ACTION_MODE_OVERLAY to coexist. Fix "custom title" dialog window decor for holo. Change-Id: Ia732caeb89e12d8d754be31c3bd2faf13a8c95d6
-rw-r--r--core/res/res/layout/dialog_custom_title_holo.xml17
-rw-r--r--core/res/res/values/styles.xml2
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java3
3 files changed, 14 insertions, 8 deletions
diff --git a/core/res/res/layout/dialog_custom_title_holo.xml b/core/res/res/layout/dialog_custom_title_holo.xml
index 854873f02e7e..74b6070a458f 100644
--- a/core/res/res/layout/dialog_custom_title_holo.xml
+++ b/core/res/res/layout/dialog_custom_title_holo.xml
@@ -23,10 +23,19 @@ This is an custom layout for a dialog.
android:fitsSystemWindows="true">
<FrameLayout android:id="@android:id/title_container"
android:layout_width="match_parent"
- android:layout_height="24dip"
+ android:layout_height="60dip"
android:layout_weight="0"
+ android:gravity="center_vertical|left"
style="?android:attr/windowTitleBackgroundStyle">
</FrameLayout>
+ <ImageView android:id="@+id/titleDivider"
+ android:layout_width="match_parent"
+ android:layout_height="4dip"
+ android:scaleType="fitXY"
+ android:gravity="fill_horizontal"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip"
+ android:src="@android:drawable/divider_strong_holo" />
<FrameLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_weight="1"
@@ -34,10 +43,6 @@ This is an custom layout for a dialog.
android:foreground="?android:attr/windowContentOverlay">
<FrameLayout android:id="@android:id/content"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingTop="6dip"
- android:paddingBottom="10dip"
- android:paddingLeft="10dip"
- android:paddingRight="10dip" />
+ android:layout_height="match_parent" />
</FrameLayout>
</LinearLayout>
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 1183915003d3..c4e815e86ebc 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -2057,7 +2057,7 @@
<!-- Window title -->
<style name="WindowTitleBackground.Holo">
- <item name="android:background">@android:drawable/title_bar</item>
+ <item name="android:background">@null</item>
</style>
<style name="WindowTitle.Holo">
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index d6b7366ea168..68c1453b8d75 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -197,7 +197,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
/* Another feature is enabled and the user is trying to enable the custom title feature */
throw new AndroidRuntimeException("You cannot combine custom titles with other title features");
}
- if (((features & (1 << FEATURE_CUSTOM_TITLE)) != 0) && (featureId != FEATURE_CUSTOM_TITLE)) {
+ if (((features & (1 << FEATURE_CUSTOM_TITLE)) != 0) &&
+ (featureId != FEATURE_CUSTOM_TITLE) && (featureId != FEATURE_ACTION_MODE_OVERLAY)) {
/* Custom title feature is enabled and the user is trying to enable another feature */
throw new AndroidRuntimeException("You cannot combine custom titles with other title features");