コード例 #1
0
 public void showErrorNetworkDialog() {
   ErrorConnectingFermatNetworkDialog errorConnectingFermatNetworkDialog =
       new ErrorConnectingFermatNetworkDialog(getActivity(), intraUserSubAppSession, null);
   errorConnectingFermatNetworkDialog.setDescription(
       "You are not connected  \n to the Fermat Network");
   errorConnectingFermatNetworkDialog.setRightButton(
       "Connect",
       new View.OnClickListener() {
         @Override
         public void onClick(View v) {}
       });
   errorConnectingFermatNetworkDialog.setLeftButton(
       "Cancel",
       new View.OnClickListener() {
         @Override
         public void onClick(View v) {}
       });
   errorConnectingFermatNetworkDialog.show();
 }
コード例 #2
0
 public void showErrorFermatNetworkDialog() {
   final ErrorConnectingFermatNetworkDialog errorConnectingFermatNetworkDialog =
       new ErrorConnectingFermatNetworkDialog(getActivity(), intraUserSubAppSession, null);
   errorConnectingFermatNetworkDialog.setLeftButton(
       "CANCEL",
       new View.OnClickListener() {
         @Override
         public void onClick(View v) {
           errorConnectingFermatNetworkDialog.dismiss();
           getActivity().onBackPressed();
         }
       });
   errorConnectingFermatNetworkDialog.setRightButton(
       "CONNECT",
       new View.OnClickListener() {
         @Override
         public void onClick(View v) {
           errorConnectingFermatNetworkDialog.dismiss();
           try {
             if (getFermatNetworkStatus() == NetworkStatus.DISCONNECTED) {
               Toast.makeText(
                       getActivity(),
                       "Wait a minute please, trying to reconnect...",
                       Toast.LENGTH_SHORT)
                   .show();
               getActivity().onBackPressed();
             }
           } catch (CantGetCommunicationNetworkStatusException e) {
             e.printStackTrace();
           } catch (Exception e) {
             e.printStackTrace();
           }
           // changeActivity(Activities.CCP_BITCOIN_WALLET_SETTINGS_ACTIVITY,
           // appSession.getAppPublicKey());
         }
       });
   errorConnectingFermatNetworkDialog.show();
 }