@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
String toastMessage = messages.get(position).toString();
Builder customdialoglayout = new AlertDialog.Builder(this)
.setCancelable(true)
.setIcon(R.drawable.icon);
TextView text = (TextView) findViewById(R.id.dialog_text);
text.setText("WTF");
setContentView(R.layout.customdialoglayout);
}
已修复问题:
Dialog dialog = new Dialog(this);
dialog.setContentView(R.layout.customdialoglayout);
dialog.setTitle(rssTitle);
dialog.setCancelable(true);
TextView text = (TextView) dialog.findViewById(R.id.dialog_text);
text.setText("WTF");
dialog.show();