how to reflect instant change on activity android

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


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.

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.

Need Your Help

Android: make AudioRecord onPeriodicNotification be called in another thread

android multithreading audio record audiorecord

So, i am using ExtAudioRecorder:

How to compile a program using static library libdl.a

c gcc libc

I am trying to compile the example code which is using APIs from libdl library: