Futher Toast replacements in CertifyKeyActivity

This commit is contained in:
Daniel Haß 2014-04-07 10:48:57 +02:00
parent 3c8be8bf85
commit ddd0111704

View File

@ -39,8 +39,9 @@ import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.ListView; import android.widget.ListView;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast;
import com.beardedhen.androidbootstrap.BootstrapButton; import com.beardedhen.androidbootstrap.BootstrapButton;
import com.devspark.appmsg.AppMsg;
import org.spongycastle.openpgp.PGPPublicKeyRing; import org.spongycastle.openpgp.PGPPublicKeyRing;
import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.R;
@ -261,7 +262,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements
startSigning(); startSigning();
} }
} else { } else {
Toast.makeText(this, R.string.key_has_already_been_signed, Toast.LENGTH_SHORT) AppMsg.makeText(this, R.string.key_has_already_been_signed, AppMsg.STYLE_ALERT)
.show(); .show();
setResult(RESULT_CANCELED); setResult(RESULT_CANCELED);
@ -278,8 +279,8 @@ public class CertifyKeyActivity extends ActionBarActivity implements
// Bail out if there is not at least one user id selected // Bail out if there is not at least one user id selected
ArrayList<String> userIds = mUserIdsAdapter.getSelectedUserIds(); ArrayList<String> userIds = mUserIdsAdapter.getSelectedUserIds();
if (userIds.isEmpty()) { if (userIds.isEmpty()) {
Toast.makeText(CertifyKeyActivity.this, "No User IDs to sign selected!", AppMsg.makeText(CertifyKeyActivity.this, "No User IDs to sign selected!",
Toast.LENGTH_SHORT).show(); AppMsg.STYLE_ALERT).show();
return; return;
} }
@ -306,8 +307,8 @@ public class CertifyKeyActivity extends ActionBarActivity implements
if (message.arg1 == KeychainIntentServiceHandler.MESSAGE_OKAY) { if (message.arg1 == KeychainIntentServiceHandler.MESSAGE_OKAY) {
Toast.makeText(CertifyKeyActivity.this, R.string.key_sign_success, AppMsg.makeText(CertifyKeyActivity.this, R.string.key_sign_success,
Toast.LENGTH_SHORT).show(); AppMsg.STYLE_INFO).show();
// check if we need to send the key to the server or not // check if we need to send the key to the server or not
if (mUploadKeyCheckbox.isChecked()) { if (mUploadKeyCheckbox.isChecked()) {
@ -358,8 +359,8 @@ public class CertifyKeyActivity extends ActionBarActivity implements
super.handleMessage(message); super.handleMessage(message);
if (message.arg1 == KeychainIntentServiceHandler.MESSAGE_OKAY) { if (message.arg1 == KeychainIntentServiceHandler.MESSAGE_OKAY) {
Toast.makeText(CertifyKeyActivity.this, R.string.key_send_success, AppMsg.makeText(CertifyKeyActivity.this, R.string.key_send_success,
Toast.LENGTH_SHORT).show(); AppMsg.STYLE_INFO).show();
setResult(RESULT_OK); setResult(RESULT_OK);
finish(); finish();