| Index: ui/android/java/src/org/chromium/ui/DropdownPopupWindow.java
|
| diff --git a/ui/android/java/src/org/chromium/ui/DropdownPopupWindow.java b/ui/android/java/src/org/chromium/ui/DropdownPopupWindow.java
|
| index 36bf7021626d7c34c387cf82378eb1e24a9fb152..e7f21d02266c37a39f3b2d1f7ccb7798424500f0 100644
|
| --- a/ui/android/java/src/org/chromium/ui/DropdownPopupWindow.java
|
| +++ b/ui/android/java/src/org/chromium/ui/DropdownPopupWindow.java
|
| @@ -134,7 +134,26 @@ public class DropdownPopupWindow extends ListPopupWindow {
|
| getListView().setDividerHeight(0);
|
| ApiCompatibilityUtils.setLayoutDirection(getListView(),
|
| mRtl ? View.LAYOUT_DIRECTION_RTL : View.LAYOUT_DIRECTION_LTR);
|
| + }
|
| +
|
| + @Override
|
| + public void setOnDismissListener(PopupWindow.OnDismissListener listener) {
|
| + mOnDismissListener = listener;
|
| + }
|
|
|
| + /**
|
| + * Sets the text direction in the dropdown. Should be called before show().
|
| + * @param isRtl If true, then dropdown text direciton is right to left.
|
| + */
|
| + public void setRtl(boolean isRtl) {
|
| + mRtl = isRtl;
|
| + }
|
| +
|
| + /**
|
| + * Disable hiding on outside tap so that tapping on a text input field associated with the popup
|
| + * will not hide the popup.
|
| + */
|
| + public void disableHideOnOutsideTap() {
|
| // HACK: The ListPopupWindow's mPopup automatically dismisses on an outside tap. There's
|
| // no way to override it or prevent it, except reaching into ListPopupWindow's hidden
|
| // API. This allows the C++ controller to completely control showing/hiding the popup.
|
| @@ -150,19 +169,6 @@ public class DropdownPopupWindow extends ListPopupWindow {
|
| }
|
| }
|
|
|
| - @Override
|
| - public void setOnDismissListener(PopupWindow.OnDismissListener listener) {
|
| - mOnDismissListener = listener;
|
| - }
|
| -
|
| - /**
|
| - * Sets the text direction in the dropdown. Should be called before show().
|
| - * @param isRtl If true, then dropdown text direciton is right to left.
|
| - */
|
| - public void setRtl(boolean isRtl) {
|
| - mRtl = isRtl;
|
| - }
|
| -
|
| /**
|
| * Measures the width of the list content. The adapter should not be null.
|
| * @return The popup window width in pixels.
|
|
|