0
I have a listview
, and with setOnItemClickListener
and/or setOnItemLongClickListener
do the deletion from the record.
I’d like to know how to open a janela
(like a modal, which opens the window and blurs the background) with opções
, for example: confirm / cancel.
It would have to create a new Activity and pass the values on to her ?! And to stay only a little window with the "dark" background as we see in various apps ?
If you have articles, tutorials, etc you can send that I like to see all.
I don’t need to pass any value then !? It would be because it runs within the method !?
– rbz
That, just utilize it within your deletion method, the only thing you will need to delete is the index of the clicked item. You may have to declare the index of the clicked item as
final
to be able to access it within the Onclicklistener of your Alertdialog, but this depends on its implementation– Zulian
It worked just right, just a little bit missing from the part:
AlertDialog.Builder builder = new AlertDialog.Builder(Main.this);
Thank you Zulian ! Hug !– rbz