R
R
RunFMe2015-03-31 10:39:34
Java
RunFMe, 2015-03-31 10:39:34

How to restart Activity after AlertDialog?

I have an Activity with information from a DB. By clicking on the button, an AlertDialog appears, where the data in the database changes, and I need to update the data on the Activity after exiting the dialog. How to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
IceJOKER, 2015-03-31
@RunFMe

Add a method that updates the data and when you click on the AlertDialog button or on the onCanceled listener ... call this method and don't even try to restart the Activity for this, this is a perversion

B
belozerow, 2015-03-31
@belozerow

Data from the database, so you need to use a cursorloader.
After changing the data, it will load the changes itself and, if everything is done correctly, will display them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question