From bff1389c9ab4442a6e278cf84ce37eadad21a9a1 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Wed, 29 Apr 2009 13:41:02 -0700 Subject: fix conflict markers --- core/java/android/widget/AutoCompleteTextView.java | 136 +-------------------- 1 file changed, 2 insertions(+), 134 deletions(-) (limited to 'core/java/android/widget/AutoCompleteTextView.java') diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index f999045..6d971a8 100644 --- a/core/java/android/widget/AutoCompleteTextView.java +++ b/core/java/android/widget/AutoCompleteTextView.java @@ -127,8 +127,6 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe // The widget is attached to a window when mAttachCount > 0 private int mAttachCount; - private AutoCompleteTextView.PassThroughClickListener mPassThroughClickListener; - public AutoCompleteTextView(Context context) { this(context, null); } @@ -188,28 +186,6 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe setFocusable(true); addTextChangedListener(new MyWatcher()); - - mPassThroughClickListener = new PassThroughClickListener(); - super.setOnClickListener(mPassThroughClickListener); - } - - @Override - public void setOnClickListener(OnClickListener listener) { - mPassThroughClickListener.mWrapped = listener; - } - - /** - * Private hook into the on click event, dispatched from {@link PassThroughClickListener} - */ - private void onClickImpl() { - // if drop down should always visible, bring it back in front of the soft - // keyboard when the user touches the text field - if (mDropDownAlwaysVisible - && mPopup.isShowing() - && mPopup.getInputMethodMode() == PopupWindow.INPUT_METHOD_NOT_NEEDED) { - mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED); - mPopup.update(); - } } /** @@ -353,51 +329,8 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe public int getDropDownHorizontalOffset() { return mDropDownHorizontalOffset; } - -||||||| -======= - - /** - *

Gets the background of the auto-complete drop-down list.

- * - * @return the background drawable - * - * @attr ref android.R.styleable#PopupWindow_popupBackground - * - * @hide Pending API council approval - */ - public Drawable getDropDownBackground() { - return mPopup.getBackground(); - } - - /** - *

Sets the background of the auto-complete drop-down list.

- * - * @param d the drawable to set as the background - * - * @attr ref android.R.styleable#PopupWindow_popupBackground - * - * @hide Pending API council approval - */ - public void setDropDownBackgroundDrawable(Drawable d) { - mPopup.setBackgroundDrawable(d); - } - - /** - *

Sets the background of the auto-complete drop-down list.

- * - * @param id the id of the drawable to set as the background - * - * @attr ref android.R.styleable#PopupWindow_popupBackground - * - * @hide Pending API council approval - */ - public void setDropDownBackgroundResource(int id) { - mPopup.setBackgroundDrawable(getResources().getDrawable(id)); - } - - /** + /** *

Sets the animation style of the auto-complete drop-down list.

* *

If the drop-down is showing, calling this method will take effect only @@ -413,7 +346,6 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe mPopup.setAnimationStyle(animationStyle); } ->>>>>>> f3ccf8a5a5a3f6e46781538358bddca992a70e3d:core/java/android/widget/AutoCompleteTextView.java /** *

Returns the animation style that is used when the drop-down list appears and disappears *

@@ -425,50 +357,6 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe public int getDropDownAnimationStyle() { return mPopup.getAnimationStyle(); } - - /** - *

Sets the vertical offset used for the auto-complete drop-down list.

- * - * @param offset the vertical offset - * - * @hide Pending API council approval - */ - public void setDropDownVerticalOffset(int offset) { - mDropDownVerticalOffset = offset; - } - - /** - *

Gets the vertical offset used for the auto-complete drop-down list.

- * - * @return the vertical offset - * - * @hide Pending API council approval - */ - public int getDropDownVerticalOffset() { - return mDropDownVerticalOffset; - } - - /** - *

Sets the horizontal offset used for the auto-complete drop-down list.

- * - * @param offset the horizontal offset - * - * @hide Pending API council approval - */ - public void setDropDownHorizontalOffset(int offset) { - mDropDownHorizontalOffset = offset; - } - - /** - *

Gets the horizontal offset used for the auto-complete drop-down list.

- * - * @return the horizontal offset - * - * @hide Pending API council approval - */ - public int getDropDownHorizontalOffset() { - return mDropDownHorizontalOffset; - } /** * @return Whether the drop-down is visible as long as there is {@link #enoughToFilter()} @@ -1149,10 +1037,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe } mPopup.setHeight(height); mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED); - - // use outside touchable to dismiss drop down when touching outside of it, so - // only set this if the dropdown is not always visible - mPopup.setOutsideTouchable(!mDropDownAlwaysVisible); + mPopup.setOutsideTouchable(true); mPopup.setTouchInterceptor(new PopupTouchIntercepter()); mPopup.showAsDropDown(getDropDownAnchorView(), mDropDownHorizontalOffset, mDropDownVerticalOffset); @@ -1469,21 +1354,4 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe */ CharSequence fixText(CharSequence invalidText); } - - /** - * Allows us a private hook into the on click event without preventing users from setting - * their own click listener. - */ - private class PassThroughClickListener implements OnClickListener { - - private View.OnClickListener mWrapped; - - /** {@inheritDoc} */ - public void onClick(View v) { - onClickImpl(); - - if (mWrapped != null) mWrapped.onClick(v); - } - } - } -- cgit v1.1