user1182476
user1182476

Reputation: 303

How to display a bullet point with this string?

How do I display this string with a bullet point?

Below is the string:

if (!this.value || this.value.length < 5) {
    alertValidation += "\nYou have not entered a valid Question\n";
}

Upvotes: 22

Views: 42879

Answers (3)

live-love
live-love

Reputation: 52366

You should enclose your strings in a resource file, strings.xml, for translation purposes. Here is how to use the bullet character in a resource file:

<string name="alert_validation">\n\u2022 You have not entered a valid Question\n</string>

alertValidation = getString(R.string.alert_validation);

Upvotes: 0

Zeyad Quness
Zeyad Quness

Reputation: 31

alert ('\u2022 A, \n\u2022 B, \n\u2022 C, \n\u2022 D');

Upvotes: 3

ori
ori

Reputation: 7847

If you want to alert() it, do:

 alertValidation += "\n\u2022 You have not entered a valid Question\n";

Upvotes: 44

Related Questions