i can't build an AlertDialog with reflection, Please help me
the my code:
try {
Class dlg= AlertDialog.Builder.class;
Method m=dlg.getDeclaredMethod("show",Context.class);
m.invoke(dlg.newInstance(),this);
} catch (Exception e) {
Log.e("Error!",e.getMessage());
}
error outputed: E/Error!: show [class android.content.Context]
Aucun commentaire:
Enregistrer un commentaire