If your calendar uses an adapter for displaying items you can change the data in the adapter and invoke adapter.notifyDataSetChanged()
. It notifies the attached observers that the underlying data has been changed and any View reflecting the data will be refreshed with the new values from the adapter.
how to reflect instant change on activity android
-
19-06-2023 - |
Question
I am currently working on calendar application
, in which when I add a event which is added in google calendar to show that event instantly on screen I am using recreate()
method of activity which fetches all event and display it again but while this process screen turn in black , which is vary bad UI experience
, how I can solve this issue , I want something like google calendar
where events are instantly added. thanks
Solution
OTHER TIPS
Use ProgressDialog
to keep the user "engaged" while you fetch new Calendar data and then take a look at this Should give you an idea of how to recreate
an Activity.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow