This is not a duplicate of String array text formatting.I have viewed the answers of that question but are not applicable to mine.Below is my code:
description = (TextView)findViewById(R.id.description);
String [] item = {"BBQ Steak \n \n marinated BBQ Steak \n \n Regular Medium Large \n \n sh 500 sh 700 sh 900","Chicken BBQ bacon \n \n BBQ Chicken,Bacon,Sweet Corn,Onion \n \n Regular Medium Large \n \n sh 500 sh 700 sh 900 ","Chicken and Mushroom \n \n chicken,mushroom \n \n Regular Medium Large \n \n sh500 sh700 sh900","Chicken tikka \n \n marinated tikka chicken, green pepper, onion \n \n Regular Medium Large \n \n sh 500 sh 700 sh 900","Stack it up(large) \n \n Double stack ANY LARGE PIZZA \n \n chicken,mushroom,creamy,tomato mayo,mozzarella cheese \n \n sh 150 extra "}
description.setText(item[x]);
I used this array to store the description of particular pizzas which will be displayed when the user selects it.The pizzas are stored in a list item. However i would like to apply formatting styles to the information in the array such as bold on words like Regular but the word Regular is not used on all pizza descriptions.The use of Spannable String is difficult because I have a large amount of text.And I would also like to use different font styles.But mostly bold and underline styling.Any help will be highly appreciated.
Bold."));` – Jun 13 '16 at 15:55