I want to implement progressBar like on the picture below.
Right now, I have AsyncTask whic is sperated from fragments classes, and I use that AsyncTask to load data, an
class YourCLassName extends AsyncTask {
private ProgressDialog pd = new ProgressDialog(Files.this);
@Override
protected void onPreExecute() {
// TODO Auto-generated method stub
super.onPreExecute();
pd.setTitle("your message");
pd.show();
}
@Override
protected Void doInBackground(String... params) {
// YOUR PIECE OF CODE
return null;
}
@Override
protected void onPostExecute(Void result) {
// TODO Auto-generated method stub
super.onPostExecute(result);
pd.setMessage("Task Completed .. whatever");
@Override
protected void onProgressUpdate(Integer... values) {
// TODO Auto-generated method stub
super.onProgressUpdate(values);
}
}