Skip to content

Commit e19e733

Browse files
author
Nicolas Sauter
committed
new file AlertDialog_with_try-catch.java
1 parent 4d760a2 commit e19e733

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

AlertDialog_with_try-catch.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import android.app.AlertDialog
2+
3+
try {
4+
//To try code
5+
} catch (Exception e) {
6+
//region AlertDialog
7+
AlertDialog.Builder msg = new AlertDialog.Builder(MainActivity.this);
8+
msg.setTitle("Meldung");
9+
msg.setMessage(e.getMessage());
10+
msg.setCancelable(true);
11+
AlertDialog msgDialog = msg.create();
12+
msgDialog.show();
13+
//endregion
14+
}

0 commit comments

Comments
 (0)