我使用以下代码关闭警报对话框:
protected void onPostExecute(String result) {
/*Toast.makeText(getActivity(), result,
Toast.LENGTH_SHORT).show(); */
if ( result.equals("0") ){
AlertDialog.Builder alert = new AlertDialog.Builder(getActivity());
alert.setTitle("Patrocinador");
alert.setMessage("Lo sentimos");
alert.setNegativeButton("Close", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
}
});
alert.show();
}
}
问题是我想替换文字"关闭" for icon png
我怎么能这样做?
谢谢