I am trying to show data from my DataObject on my Activity. Everything works fine and do not crash anywhere but my views are not updated with the information. I'm begginner on android, I know this... Please Can anyone help me? Thanks
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail);
LayoutInflater inflater = LayoutInflater.from(DetailActivity.this);
vp = (RelativeLayout)inflater.inflate(R.layout.activity_detail, null);
String object_id = getIntent().getStringExtra("getIn"); // Get object_id from Intent
DataQuery query = DataQuery.get("Id");
query.getInBackground(object_id, new GetCallback<DataObject>() {
@Override
public void done(DataObject object, DataException e) {
if (e == null) {
TextView price = (TextView)vp.findViewById(R.id.priceD);
price.setText((String) object.get("price"));
TextView productD = (TextView)vp.findViewById(R.id.productD);
productD.setText((String) object.get("product"));
ImageView thumbnail= (ImageView)vp.findViewById(R.id.thumbnail2);
thumbnail.setImageBitmap((Bitmap) object.get("image"));
TextView descriptionD = (TextView)vp.findViewById(R.id.description );
descriptionD.setText((String) object.get("description"));
// }
} else {
// Error
}
}
});