Android: how to create a popup with a choice

I want to do something like this: the user clicks the “Choose color” button and a simple pop-up window, for example. 5 colors appear. I could do this with PopupWindow and an internal ListView, but is there a simpler solution like a specific widget for this?

What it should look like: alt text

+4
source share
1 answer

Use AlertDialog.Builder and put the Adapter through setAdapter() , which generates your lines.

+8
source

Source: https://habr.com/ru/post/1299270/


All Articles