Денис Климков Денис Климков - 1 year ago 94
Android Question

How to change the color of text programmatically with JSON

I have JSON file with object "status". Status has got 3 parameters: id, title, color.
My Model:

public int StatusId;
public String StatusTitle;
public String StatusColor;

My GetHelper:

JSONObject status = data.getJSONObject("status");
orderDetails.StatusId = status.getInt("id");
orderDetails.StatusTitle = status.getString("title");
orderDetails.StatusColor = status.getString("color");

When I get my string with color, I want put it. For this I do it:


But It's not working.
I will be glad to any advice.

Answer Source
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download