Commit b1cc586e authored by Theresa's avatar Theresa Committed by Commit Bot

[Modern] Update popup/dialog background 9-patch

Replace menu_bg and edge_menu_bg with a new modern popup_bg.

BUG=823531

Change-Id: Idec73e189527363cb8186e006e22657a4b5dad8d
Reviewed-on: https://chromium-review.googlesource.com/1108924Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarBecky Zhou <huayinz@chromium.org>
Commit-Queue: Theresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569660}
parent 4540438b
......@@ -10,7 +10,7 @@
android:id="@+id/find_toolbar"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/bg_find_toolbar_popup"
android:background="@drawable/popup_bg"
android:visibility="gone">
<include
android:layout_width="match_parent"
......
......@@ -8,8 +8,7 @@
android:id="@+id/data_reduction_menu_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="#EDFAFAFA" >
android:orientation="vertical" >
<View style="@style/Divider" />
......
......@@ -13,7 +13,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:gravity="center"
android:background="@drawable/menu_bg"
android:background="@drawable/popup_bg"
app:maxWidthLandscape="@dimen/payments_ui_max_dialog_width"
app:maxWidthPortrait="@dimen/payments_ui_max_dialog_width" >
......
......@@ -18,7 +18,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
android:background="@drawable/menu_bg"
android:background="@drawable/popup_bg"
app:maxWidthLandscape="@dimen/dialog_max_width"
app:maxWidthPortrait="@dimen/dialog_max_width" >
......
......@@ -100,6 +100,7 @@
</style>
<style name="AlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="android:windowBackground">@drawable/popup_bg</item>
<item name="android:textColorHighlight">@color/text_highlight_color</item>
<!-- Overriding AppCompat values -->
......
......@@ -195,12 +195,9 @@ public class AppMenu implements OnItemClickListener, OnKeyListener {
// Need to explicitly set the background here. Relying on it being set in the style caused
// an incorrectly drawn background.
if (isByPermanentButton) {
mPopup.setBackgroundDrawable(
ApiCompatibilityUtils.getDrawable(context.getResources(), R.drawable.menu_bg));
} else {
mPopup.setBackgroundDrawable(ApiCompatibilityUtils.getDrawable(
context.getResources(), R.drawable.edge_menu_bg));
mPopup.setBackgroundDrawable(
ApiCompatibilityUtils.getDrawable(context.getResources(), R.drawable.popup_bg));
if (!isByPermanentButton) {
mPopup.setAnimationStyle(R.style.OverflowMenuAnim);
}
......
......@@ -96,7 +96,7 @@ public class TranslateMenuHelper implements AdapterView.OnItemClickListener {
// caused an incorrectly drawn background.
// TODO(martiw): We might need a new menu background here.
mPopup.setBackgroundDrawable(
ContextCompat.getDrawable(mContextWrapper, R.drawable.edge_menu_bg));
ContextCompat.getDrawable(mContextWrapper, R.drawable.popup_bg));
mPopup.setOnItemClickListener(this);
......
......@@ -33,7 +33,7 @@ public class AppModalPresenter extends ModalDialogManager.Presenter {
FrameLayout.LayoutParams params =
new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.CENTER);
dialogView.setBackgroundResource(R.drawable.menu_bg);
dialogView.setBackgroundResource(R.drawable.popup_bg);
container.addView(dialogView, params);
if (getModalDialog().getCancelOnTouchOutside()) {
mDialog.setCanceledOnTouchOutside(true);
......
......@@ -286,7 +286,7 @@ public class TabModalPresenter
FrameLayout.LayoutParams params =
new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.CENTER);
dialogView.setBackgroundResource(R.drawable.menu_bg);
dialogView.setBackgroundResource(R.drawable.popup_bg);
mDialogContainer.addView(dialogView, params);
mDialogContainer.setAlpha(0f);
mDialogContainer.setVisibility(View.VISIBLE);
......
......@@ -221,7 +221,7 @@ public class ListMenuButton
ViewRectProvider rectProvider = new ViewRectProvider(this);
rectProvider.setIncludePadding(true);
mPopupMenu = new AnchoredPopupWindow(getContext(), this,
ApiCompatibilityUtils.getDrawable(getResources(), R.drawable.menu_bg), contentView,
ApiCompatibilityUtils.getDrawable(getResources(), R.drawable.popup_bg), contentView,
rectProvider);
mPopupMenu.setVerticalOverlapAnchor(true);
mPopupMenu.setHorizontalOverlapAnchor(true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment