@Override protected void onCancelled() { mCipherText.setText("error!"); setKeyActionButtonsEnabled(true); mCipherText.setTextColor(getResources().getColor(android.R.color.primary_text_dark)); } }
@Override protected void onCancelled() { mCipherText.setText("error!"); setKeyActionButtonsEnabled(true); mCipherText.setTextColor(getResources().getColor(android.R.color.primary_text_dark)); } }
@Override public void onFocusChange(View v, boolean hasFocus) { mPlainText.setTextColor(getResources().getColor(android.R.color.primary_text_dark)); } });
@Override protected void onPostExecute(Boolean result) { if (result) { mCipherText.setTextColor(getResources().getColor(R.color.solid_green)); } else { mCipherText.setTextColor(getResources().getColor(R.color.solid_red)); } setKeyActionButtonsEnabled(true); }
@Override protected void onPostExecute(Boolean result) { if (result) { mCipherText.setTextColor(getResources().getColor(R.color.solid_green)); } else { mCipherText.setTextColor(getResources().getColor(R.color.solid_red)); } setKeyActionButtonsEnabled(true); }
@Override public void onFocusChange(View v, boolean hasFocus) { mCipherText .setTextColor(getResources().getColor(android.R.color.primary_text_dark)); } });
@Override public void onFocusChange(View v, boolean hasFocus) { mCipherText .setTextColor(getResources().getColor(android.R.color.primary_text_dark)); } });
@Override public void onFocusChange(View v, boolean hasFocus) { mPlainText.setTextColor(getResources().getColor(android.R.color.primary_text_dark)); } });
@Override public void onClick(View v) { /* * When the user presses the "Generate" button, we'll * check the alias isn't blank here. */ final String alias = aliasInput.getText().toString(); if (alias == null || alias.length() == 0) { aliasInput.setError(getResources().getText(R.string.keystore_no_alias_error)); } else { /* * It's not blank, so disable the generate button while * the generation of the key is happening. It will be * enabled by the {@code AsyncTask} later after its * work is done. */ aliasInput.setError(null); mGenerateButton.setEnabled(false); new GenerateTask().execute(alias); } } });
@Override public void onClick(View v) { /* * When the user presses the "Generate" button, we'll * check the alias isn't blank here. */ final String alias = aliasInput.getText().toString(); if (alias == null || alias.length() == 0) { aliasInput.setError(getResources().getText(R.string.keystore_no_alias_error)); } else { /* * It's not blank, so disable the generate button while * the generation of the key is happening. It will be * enabled by the {@code AsyncTask} later after its * work is done. */ aliasInput.setError(null); mGenerateButton.setEnabled(false); new GenerateTask().execute(alias); } } });