I have a problem. I have a custom object with fields like
private String id;
private int key;
private String name;
private String desc;
private int sortorder;
private int color;
And constructor like
public Label(String id, int key, String name, String desc, int sortorder, int color)
I'm putting color when creating object like this
Color.rgb(dialogColorRed, dialogColorGreen, dialogColorBlue)
Where dialogColorRed, dialogColorGreen, dialogColorBlue - are randomly assigned values from 0 to 255.
Then I'm packing an ArrayList of my Objects in JSON, the object looks like this (pay attention to color field)
"color": -6508994,
"desc": "",
"id": "81fed08a336b185e226a93f199f34803",
"key": 87,
"name": "w",
"sortorder": 0
I'm getting negative color int value, but i need something like this
"color":"4278255360"
What is the problem?