Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89638220 authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Prevent AutoCompleteTextView from opening a popup when it shouldn't Bug #5553515"

parents d22bf4b0 c27cc01f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1031,8 +1031,10 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
    public void ensureImeVisible(boolean visible) {
        mPopup.setInputMethodMode(visible
                ? ListPopupWindow.INPUT_METHOD_NEEDED : ListPopupWindow.INPUT_METHOD_NOT_NEEDED);
        if (mPopup.isDropDownAlwaysVisible() || (mFilter != null && enoughToFilter())) {
            showDropDown();
        }
    }

    /**
     * @hide internal used only here and SearchDialog
+9 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.os.Bundle;
import android.text.TextPaint;
import android.view.View;

@SuppressWarnings({"UnusedDeclaration"})
@@ -39,6 +40,7 @@ public class TextActivity extends Activity {
        private final Paint mScaledPaint;
        private final Paint mSkewPaint;
        private final Paint mHugePaint;
        private final TextPaint mEventPaint;

        CustomTextView(Context c) {
            super(c);
@@ -70,6 +72,11 @@ public class TextActivity extends Activity {
            mHugePaint.setAntiAlias(true);
            mHugePaint.setColor(0xff000000);
            mHugePaint.setTextSize(300f);

            mEventPaint = new TextPaint();
            mEventPaint.setFakeBoldText(true);
            mEventPaint.setAntiAlias(true);
            mEventPaint.setTextSize(14);
        }

        @Override
@@ -77,6 +84,8 @@ public class TextActivity extends Activity {
            super.onDraw(canvas);
            canvas.drawRGB(255, 255, 255);

            canvas.drawText("Hello OpenGL renderer!", 300, 20, mEventPaint);
            
            mMediumPaint.setStyle(Paint.Style.FILL_AND_STROKE);
            mMediumPaint.setStrokeWidth(2.0f);
            canvas.drawText("Hello OpenGL renderer!", 100, 20, mMediumPaint);