I'm receiving a string from a windows application, the string is like this:
"some text\r\nsome other text"
When I display the string in an alert dialog I see the following:
"some textrnsome other text"
The same string is showing correctly on a TextView, but not in an AlertDialog.
Please advice what I should do.
Best Regards.
Edit This is what I tried so far:
CustomDialog.Builder dialog = new CustomDialog.Builder(this, "", getString(R.string.ok));
dialog.contentColor(getResources().getColor(R.color.content_color));
dialog.titleColor(getResources().getColor(R.color.content_color));
dialog.positiveColor(getResources().getColor(R.color.cpb_red));
dialog.content(Message.replace("\r\n", "\n"));
dialog.build().show();
Edit 2: Let me explain more, I receive a JSON response from a WCF Service on Windows, parse JSON using FastJson the text I receive from JSON after parsing is
Server Will\r\n be down for maintenance
We just added \r\n for testing purpose but I'm sure someone will use them when sending data to Android. I have tried replacing using replace function, but no success.