コード例 #1
0
  /** Create the loading view and lock the screen */
  private void createLoadingView() {
    ActivityUtils.lockScreenOrientation(context);

    if (loadType == LoadTypeEnum.INIT) {
      progressDialog.setIndeterminate(true);
      progressDialog.setCancelable(true);
      progressDialog.setOnCancelListener(
          new DialogInterface.OnCancelListener() {
            public void onCancel(DialogInterface dialog) {
              cancel(true);
            }
          });
      progressDialog.show();
    }
  }