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

Commit e1684cda authored by Kirill Grouchnikov's avatar Kirill Grouchnikov Committed by Android (Google) Code Review
Browse files

Merge "Add @TestApi method to Spinner to test whether popup is showing."

parents 14820c04 fd62b357
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -47906,6 +47906,7 @@ package android.widget {
    method public android.graphics.drawable.Drawable getPopupBackground();
    method public android.content.Context getPopupContext();
    method public java.lang.CharSequence getPrompt();
    method public boolean isPopupShowing();
    method public void onClick(android.content.DialogInterface, int);
    method public void setDropDownHorizontalOffset(int);
    method public void setDropDownVerticalOffset(int);
+9 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.widget;

import android.annotation.TestApi;
import com.android.internal.R;
import com.android.internal.view.menu.ShowableListMenu;

@@ -359,6 +360,14 @@ public class Spinner extends AbsSpinner implements OnClickListener {
        return mPopup.getBackground();
    }

    /**
     * @hide
     */
    @TestApi
    public boolean isPopupShowing() {
        return (mPopup != null) && mPopup.isShowing();
    }

    /**
     * Set a vertical offset in pixels for the spinner's popup window of choices.
     * Only valid in {@link #MODE_DROPDOWN}; this method is a no-op in other modes.