I have fetching data from sqlite database. What i want is to display with bold the "Name" of each of my products.
Here is the code:
fullProductDetails = "<b>Name: </b>"+data.getString(1) + "| Price: " + data.getString(2) + "| Quantity: " + data.getString(3);
The problem is that it's displaying the "b" character instead of bold in my listview.
Update
Here is a bit more of code:
Cursor data = mDatabaseHelper.getData();
ArrayList<String> listData = new ArrayList<>();
while (data.moveToNext()) {
//get the value from the database in column 1
//then add it to the ArrayList
totalPrice=Float.parseFloat(data.getString(2))*Float.parseFloat(data.getString(3));
fullProductDetails = "<b>Name: </b>"+data.getString(1) + "| Price: " + data.getString(2) + "| Quantity: " + data.getString(3);
listData.add(fullProductDetails+" <b>Total Price: </b>"+totalPrice);
}
//create the list adapter and set the adapter
ListAdapter adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, listData);
mListView.setAdapter(adapter);
Here is the screenshot. You can see two times "B" because i was testing something else. Ignore the second.