Android: View.setID(int id) programmatically – how to avoid ID conflicts?

I’m adding TextViews programmatically in a for-loop and add them to an ArrayList.

How do I use TextView.setId(int id)? What Integer ID do I come up with so it doesn’t conflict with other IDs?

15 Answers
15

Leave a Comment