Reputation: 6128
guys i am having a text like this:
A: hi how are you.
B: I am fine thank you.
A: how is your mother.
B: she is fine.
i want in the same way to be displayed in the alert window irrespetive of text lenght.below is my alert window code.
AlertDialog.Builder bu = new AlertDialog.Builder(this);
bu.setMessage(""+((Node) textFNListU.item(0)).getNodeValue().trim());
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() ->this value i am fecthing from xml.
how to acheive this
Upvotes: 0
Views: 541
Reputation: 8333
try this:
bu.setMessage(""+((Node) textFNListU.item(0)).getNodeValue().trim().replace(".",".\n"));
Upvotes: 1