I am creating an android app in which I want to create Boolean Array of size of maximum value of IDs so that I can uniquely store the changes on the buttons.
Suppose my button id is 102931, when user click on the button I will make change in the Boolean array's 102931th element so that later I can check the changed value in it.
Now My Question is
What is the range of IDs(min-max) for any view?
They can be positive integers, but also, ids generated at build time will have a value greater than 0x00FFFFFF
. If you look at View.generateViewId()
you will see that dynamically generated ids are in range 1
to 0x00FFFFFF
inclusive. Above that, there are R.id
's ids.
The default id of a View
is View.NO_ID
which has value -1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With