I need to start an activity when the user chooses an item in an alert dialog. How do I get the context to pass to the intent constructor in the following code...
builder.setItems(items, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
Intent i = new Intent(<WHAT DO I PUT HERE?>, <new activity>.class);
startActivity(i);
}
});
Is it the use of the inner class?? Any thoughts?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…