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:  Portable version View.generateViewId() (for API 16)