Today imma trying to develop a simple app, which will ask the user to insert 2 dates by using the DatePickerDialog through a button, and then execute a query into a Database:
Button.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View arg0) {
Da = new DatePickerDialog(MainActivity.this, DADateSetListener, 2014, 8, 24);
Da.show();
Da.setTitle("Date FROM");
A = new DatePickerDialog(MainActivity.this, ADateSetListener, 2014, 10, 24);
A.show();
A.setTitle("Date TO");
//Erase the List View
List.setAdapter(null);
prepareProgressBar();
query();
}
});
My only question is: How can i wait for the DatePickerDialog do dismiss or wait for the user to enter the input and then execute the query ?