public void cloneRepo() { onClicked(null, null, false); }
showToastMessage(R.string.alert_remoteurl_required); mRemoteURL.setError(getString(R.string.alert_remoteurl_required)); mRemoteURL.requestFocus(); return; showToastMessage(R.string.alert_localpath_required); mLocalPath.setError(getString(R.string.alert_localpath_required)); mLocalPath.requestFocus(); return; showToastMessage(R.string.alert_localpath_format); mLocalPath.setError(getString(R.string.alert_localpath_format)); mLocalPath.requestFocus(); return; if (mLocalPath.getHint().toString() != getString(R.string.dialog_clone_local_path_hint)) { localPath = mLocalPath.getHint().toString(); File file = Repo.getDir(getActivity(), localPath); if (file.exists()) { showToastMessage(R.string.alert_localpath_repo_exists); mLocalPath .setError(getString(R.string.alert_localpath_repo_exists)); mLocalPath.requestFocus(); return; String password = mPassword.getText().toString(); boolean savePassword = mIsSavePassword.isChecked(); onClicked(username, password, savePassword);
@Override public boolean onOptionsItemSelected(MenuItem item) { Intent intent; switch (item.getItemId()) { case R.id.action_new: CloneDialog cloneDialog = new CloneDialog(); cloneDialog.show(getFragmentManager(), "clone-dialog"); return true; case R.id.action_import_repo: intent = new Intent(this, ImportRepositoryActivity.class); startActivityForResult(intent, REQUEST_IMPORT_REPO); forwardTransition(); return true; case R.id.action_settings: intent = new Intent(this, UserSettingsActivity.class); startActivity(intent); return true; } return super.onOptionsItemSelected(item); }
public Dialog onCreateDialog(Bundle savedInstanceState) { super.onCreateDialog(savedInstanceState); mActivity = (RepoListActivity) getActivity(); AlertDialog.Builder builder = new AlertDialog.Builder(mActivity); LayoutInflater inflater = mActivity.getLayoutInflater(); fillInformationFromPreviousCloneFail( Profile.getLastCloneTryRepo() );
@Override public void onStart() { super.onStart(); AlertDialog dialog = (AlertDialog) getDialog(); if (dialog == null) return; Button positiveButton = (Button) dialog .getButton(Dialog.BUTTON_POSITIVE); positiveButton.setOnClickListener(this); }
@Override public void onClick(DialogInterface dialog, int which) { InitDialog id = new InitDialog(); id.show(getFragmentManager(), "init-dialog"); } });