I have one sentence with 3 TextView
in my RecyclerView. The picture is like below :
In that picture, I have one sentence in 3 TextView
, there are "1" "HOT, MORE CHILLI" and "Pizza". This is my RecyclerView Binding code :
try {
view.txtArticlesName.setText(/*orderList.getJSONObject(position).getString("quantityValue") +*/
/*orderList.getJSONObject(position).getString("spesial-request").replaceAll("[\\\"\\[\\]]", "") + */
orderList.getJSONObject(position).getString("bezeich"));
view.txtQty.setText(orderList.getJSONObject(position).getString("quantityValue"));
view.txtReqList.setText(orderList.getJSONObject(position).getString("spesial-request").replaceAll("[\\\"\\[\\]]", ""));
} catch (JSONException e) {
e.printStackTrace();
}
I want to Join all of TextView
with only one 'TextView` dynamicly. I'll try this :
view.txtArticlesName.setText(/*orderList.getJSONObject(position).getString("quantityValue") +*/
/*orderList.getJSONObject(position).getString("spesial-request").replaceAll("[\\\"\\[\\]]", "") + */
orderList.getJSONObject(position).getString("bezeich"));
But its not work, its not bind the data, so the TextView
just show the default text "Hello World". Can TextView
do this? I read about Spannable too but i dont know how its work to add new word in one TextView
. Or there is another way to do this? Any suggest and answer will helpfull for me. Thanks before.