I would like to make a popup window with a textview from my widget (AppWidgetProvider), I want 2 buttons in the bottom "Update" and "Close". I tried using a AlertDialog but it crashes the widget.
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage("Sample text")
.setCancelable(false)
.setPositiveButton("Update", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
CallUpdate(context);
}
})
.setNegativeButton("Close", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
});
builder.show();
我想能够使用Spanned文本。
感谢。