Code example for ProgressBar

Methods: setVisibility, getVisibility

0
 
    @Override 
    protected void onResume() { 
        super.onResume(); 
 
        if (mProgress.getVisibility() == View.VISIBLE) {
            mProgress.setVisibility(View.GONE);
        } 
    } 
 
    @Override 
    protected void onPause() { 
        super.onPause(); 
 
        AsyncTask<LoginParameters, Void, Object> task = runningTask;
        if (task != null)
            task.cancel(false);
 
    } 
 
    private void onError(Exception ex) {