SyntaxFix
Write A Post
Hire A Developer
Questions
This works for me:
static int id = 1; // Returns a valid id that isn't in use public int findId(){ View v = findViewById(id); while (v != null){ v = findViewById(++id); } return id++; }