Question

can I use PopupMenu in older API without using support library v7 ?

I am already using support library v4, but it's not enough for this

and what is the alternative, if I don't use it ?

Was it helpful?

Solution

PopupMenu is only available in API 11 or higher. As far as I can tell from the documentation it is not included in any support library and thus cannot be used on a lower api version. You should probably use an alternative like a Dialog or ContextMenu in those situations. It's not the same thing but kind of close.

OTHER TIPS

You must import support v7 in your application same as follow: Adding libraries with resources

and in your project import android.support.v7.widget.PopupMenu and then compile your code with that your popup menu is compatible for android 2.2 and above.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top