嗨,大家好,我有一個XML中,我有以下幾點:更改特定文本的顏色警報對話框
John:How are you?
Mary:I am fine.How about you.
John:what is your plan today?
我。現在我需要的John,Mary
文字與BOLD
和取出由XML這些值different color
。還需要更改警報窗口的背景顏色。
此警告對話框中,我使用:
AlertDialog.Builder bu = new AlertDialog.Builder(this);
bu.setMessage(""+((Node) textFNListU.item(0)).getNodeValue().trim().replace("$","\n"));
bu.setCancelable(true);
bu.setPositiveButton("OK",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
// TODO Auto-generated method stub
dialog.cancel();
}
});
bu.create().show();
((Node) textFNListU.item(0)).getNodeValue().trim())
----這個我從XML
所獲得的價值,請幫助。
上的任何鏈接請 – Goofy 2012-02-22 09:35:56
http://developer.android.com/guide/topics/ui/dialogs.html「創建自定義對話框」,在它使用生成器.setView();在ApiDemo中也存在相關的示例。希望對你有所幫助 – JohnCookie 2012-02-22 09:39:19