This is my code simplified.
setOnClickListener
_view = new View(MainActivity.this);
_root.addView(_view);
I click, and a new view gets added. But i need to distinguish these view somehow. So i tired this.
_view.setId(View.generateViewId());
Unfortunatly this showed up.
Call requires API level 17 (current min is 16): android.view.View#generateViewId
Any suggestions are appreciated, thanks!
Edit: Sorry, should've said this before, I need it to be on API level 16.