I had developed an Android application. After entering the passcode my application will check whether customer is there in the database or not and then my application continues. during this process I want to keep an loading image as not to be in still position. I had given code like this
login_btn.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//ProgressDialog progressDialog = new ProgressDialog(context);
// progressDialog.setMessage("Loading...");
// progressDialog.setCancelable(true);
//progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
// progressDialog.setProgress(0); // set percentage completed to 0%
// progressDialog.show();
DAO dbObj = DAO.getInstance(context);
But now the problem is loading image is running after my application started running. However, I want to run the loading image between login and start of application.
You have to hide/close/disable progresDialog at the end of initialization of your application. It will not disappear by itself. How it will know that you are finished?