Avocarrot / json2view

Update native Android UI on the fly
MIT License
1.51k stars 281 forks source link

Can't get object IDs #36

Closed MkVII closed 7 years ago

MkVII commented 7 years ago

Hi, thanks for this tool.

When I create a checkbox for example using this tool, I cannot set the resource ID which I need to initialize the checkbox.

Thanks Brad

tsiougkosn commented 7 years ago

Hello Brad,

You can check the example 02 (https://github.com/Avocarrot/json2view/wiki/Creating-Dynamic-Layouts) In your case you will have a CheckBox instead of the clickableView so you can have reference to your Checkbox by using

((SampleViewHolder) sampleView.getTag()).checkbox....

Let me know if that help you, Nikos