chnouman/AwesomeDialog

java vesrion or code

yasdeveloper opened this issue · 6 comments

hi
nice project
but how i can use it from java ?

+1

+1

+1

bs-q commented

Code that i used in my java project
AlertDialog alertDialog = AwesomeDialog.Companion.build(currentActivity); AwesomeDialogKt.body(alertDialog,currentActivity.getString(R.string.bio_login_error) + errString,null, 0 ); AwesomeDialogKt.icon(alertDialog, R.drawable.fingerprint_dialog_error,false); AwesomeDialogKt.onPositive(alertDialog, currentActivity.getString(R.string.close), null, null, new Function0<Unit>() { @Override public Unit invoke() { alertDialog.dismiss(); currentActivity.finishAndRemoveTask(); return null; } }); alertDialog.show();