question: public static int generateViewId ( ) { for ( ; ; ) { final int result = sNextGeneratedId . get ( ) ; int newValue = result + 1 ; if ( newValue > 0x00FFFFFF ) newValue = 1 ; if ( sNextGeneratedId . compareAndSet ( result , newValue ) ) { return result ; } } }
target:  Generate a value suitable for use in setId(int) This value will not collide with ID values generated at build time by aapt for R.id.