Replaced Toasts with AppMsg-Library notifys
This commit is contained in:
@@ -50,6 +50,7 @@ import android.widget.ArrayAdapter;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.beardedhen.androidbootstrap.BootstrapButton;
|
import com.beardedhen.androidbootstrap.BootstrapButton;
|
||||||
|
import com.devspark.appmsg.AppMsg;
|
||||||
|
|
||||||
public class ImportKeysActivity extends DrawerActivity implements ActionBar.OnNavigationListener {
|
public class ImportKeysActivity extends DrawerActivity implements ActionBar.OnNavigationListener {
|
||||||
public static final String ACTION_IMPORT_KEY = Constants.INTENT_PREFIX + "IMPORT_KEY";
|
public static final String ACTION_IMPORT_KEY = Constants.INTENT_PREFIX + "IMPORT_KEY";
|
||||||
@@ -282,8 +283,8 @@ public class ImportKeysActivity extends DrawerActivity implements ActionBar.OnNa
|
|||||||
Log.d(Constants.TAG, "fingerprint: " + fingerprint);
|
Log.d(Constants.TAG, "fingerprint: " + fingerprint);
|
||||||
|
|
||||||
if (fingerprint.length() < 16) {
|
if (fingerprint.length() < 16) {
|
||||||
Toast.makeText(this, R.string.import_qr_code_too_short_fingerprint,
|
AppMsg.makeText(this, R.string.import_qr_code_too_short_fingerprint,
|
||||||
Toast.LENGTH_LONG).show();
|
AppMsg.STYLE_ALERT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,7 +393,7 @@ public class ImportKeysActivity extends DrawerActivity implements ActionBar.OnNa
|
|||||||
} else {
|
} else {
|
||||||
toastMessage = getString(R.string.no_keys_added_or_updated);
|
toastMessage = getString(R.string.no_keys_added_or_updated);
|
||||||
}
|
}
|
||||||
Toast.makeText(ImportKeysActivity.this, toastMessage, Toast.LENGTH_SHORT)
|
AppMsg.makeText(ImportKeysActivity.this, toastMessage, AppMsg.STYLE_INFO)
|
||||||
.show();
|
.show();
|
||||||
if (bad > 0) {
|
if (bad > 0) {
|
||||||
AlertDialog.Builder alert = new AlertDialog.Builder(
|
AlertDialog.Builder alert = new AlertDialog.Builder(
|
||||||
@@ -474,7 +475,7 @@ public class ImportKeysActivity extends DrawerActivity implements ActionBar.OnNa
|
|||||||
// start service with intent
|
// start service with intent
|
||||||
startService(intent);
|
startService(intent);
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(this, R.string.error_nothing_import, Toast.LENGTH_LONG).show();
|
AppMsg.makeText(this, R.string.error_nothing_import, AppMsg.STYLE_ALERT).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user