I need to embed a newline in a notification. I have two lines of data that are different and I need to embed a newline to distinguish between the two.
I trued a backslash-n, but that does not work.
Is there a way to do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As far as I know there is no way to do this other than creating a custom
Notificationlayout. TheNotificationdocumentation has a step-by-step process on doing this and is quite thorough. Here is the link to that.Creating the two lines as you require would just mean putting in an extra
TextViewin the layout XML. Then you would just set eachTextView‘s text to your two lines of data, as the example shows.