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(); }
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(); }