What is Handler in android?

The Handler class can update the user interface. A Handler provides methods for receiving instances of the Message or Runnable class.
as for example 
private Handler mHandler=new Handler();
now in your UI(onClick event)

mHandler.post(new Runnable(){
public void run(){
//e.g. save to the database
}
}

No comments:

Post a Comment