user1528799
user1528799

Reputation: 463

How to check dropDown status (shown or hidden) in autoCompleteTextView?

How to check dropdown status (shown or hidden) in AutoCompleteTextView in Android?

Upvotes: 7

Views: 3030

Answers (3)

IntelliJ Amiya
IntelliJ Amiya

Reputation: 75788

You can use isPopupShowing() method.

Indicates whether the popup menu is showing. Returns true if the popup menu is showing, false otherwise

Finally

if(YourAutoCompleteTextViewObject.isPopupShowing()){
// Your code
}else{
// Your code
}

Upvotes: 12

user1831682
user1831682

Reputation:

if(autoCompleteTextView.isPopupShowing()){
......
}else{

...}

Upvotes: 2

QArea
QArea

Reputation: 4981

Try to use isPopupShowing for this. Here you can find many other interesting things: http://developer.android.com/reference/android/widget/AutoCompleteTextView.html

Upvotes: 1

Related Questions