Really new to Java and Android but trying to learn. In process of creating a dialog alert I am using the stringbuilder to put together a message to the user. I am taking several lines of text from my string.xml file that looks like
<string name="lbl_deactivated_error">YOU HAVE BEEN DEACTIVATED</string>
<string name="lbl_notification_line2">Call Customer Service 1–800-xxx-xxxx-/string>
<string name="lbl_notification_line3">Email support@xxxx.com</string>
<string name="lbl_notification_line6">Please Exit By Pressing Home.</string>
My stringbuilder looks like
AlertDialog.Builder dialog = new AlertDialog.Builder(ErrorActivity.this);
dialog.setTitle(lbl_deactivated_error);
alertmessage.append(lbl_notification_line2);
alertmessage.append("\n");
alertmessage.append(lbl_notification_line3);
alertmessage.append("\n");
alertmessage.append(lbl_notification_line6);
dialog.setMessage(alertmessage.toString());
dialog.show();
When executed, the alert shows with the title but the message shows a set of numbers, not the text as shown in the strings.xml. It prints each line of the text with the returns, but I get something like YOU HAVE BEEN DEACTIVATED
2131099688
2131099688
2131099688
Is there an obvious mistake I am making? Does it have something to do with the hyphens in the phone number maybe?