My activities sends long-term requests to slow server, so after sends they show “Loading, please wait” activity (with cute pinkish progressbar, white rabbits, etc) this way:
@Override
public void onClick(View v) {
~sendRequestThroughRunnable();
startActivity(new Intent(Activity.this, LoadingActivity.class));
}
Afterward parent activity get exact notification about end of requests through callback functions (from other thread), so my question is, how can i finish (or stop, etc) LoadingActivity from parent activity and get back control?
Replace
startActivity()withstartActivityForResult(intent, requestCode). When it’s time to finish the LoadingActivity callfinishActivity(requestCode).