Esempio n. 1
0
 protected void showLoadingPage() {
   if (mLoadDialogView == null) {
     GDLoadingDialogView.Builder builder =
         new GDLoadingDialogView.Builder(this, R.layout.no_network_error_view);
     mLoadDialogView = builder.create();
     mLoadDialogView.ShowDialog();
   } else {
     if (!mLoadDialogView.isShowing()) mLoadDialogView.ShowDialog();
   }
   mLoadDialogView.showLoadingInfo();
   mLoadDialogView.setCancelable(true);
 }
Esempio n. 2
0
 public void showErrorMsg(String error) {
   mHandler.removeCallbacks(mTimeoutTask);
   mHandler.removeCallbacks(mNoResponseTask);
   if (mLoadDialogView == null) showLoadingPage();
   if (!mLoadDialogView.isShowing()) mLoadDialogView.ShowDialog();
   mLoadDialogView.showLoadErrorInfo(error);
   if (mPageContent != null && mPageContent.getVisibility() == View.VISIBLE) {
     mHandler.postDelayed(
         new Runnable() {
           @Override
           public void run() {
             hideloadingPage();
           }
         },
         1000);
   } else {
     mLoadDialogView.setCancelable(true);
   }
 }
Esempio n. 3
0
  private void handCanNotConnectToServer() {
    mHandler.removeCallbacks(mTimeoutTask);
    mHandler.removeCallbacks(mNoResponseTask);
    if (mLoadDialogView != null) {
      mLoadDialogView.showNetWorkErrorInfo();
      mLoadDialogView.setCancelable(true);
    }
    if (mPageContent != null && mPageContent.getVisibility() == View.VISIBLE) {
      mHandler.postDelayed(
          new Runnable() {

            @Override
            public void run() {
              hideloadingPage();
            }
          },
          1000);
    }
  }
Esempio n. 4
0
 @Override
 public void run() {
   if (mLoadDialogView != null && mLoadDialogView.isShowing()) handCanNotConnectToServer();
 }
Esempio n. 5
0
 protected void onStop() {
   super.onStop();
   if (mLoadDialogView != null) mLoadDialogView.dismiss();
 };
Esempio n. 6
0
 protected void hideloadingPage() {
   mHandler.removeCallbacks(mNoResponseTask);
   if (mLoadDialogView != null && mLoadDialogView.isShowing()) {
     mLoadDialogView.hideDialog();
   }
 }