@@ -0,0 +1,939 @@
+package org.ccci.gto.android.common.util;%0A%0Aimport android.os.Build;%0Aimport android.view.View;%0A%0Aimport java.util.concurrent.atomic.AtomicInteger;%0A%0Apublic final class ViewCompat %7B%0A    private static final AtomicInteger sNextGeneratedId = new AtomicInteger(1);%0A%0A    public static int generateViewId() %7B%0A        if (Build.VERSION.SDK_INT %3C Build.VERSION_CODES.JELLY_BEAN_MR1) %7B%0A            while (true) %7B%0A                final int result = sNextGeneratedId.get();%0A                // aapt-generated IDs have the high byte nonzero; clamp to the range under that.%0A                int newValue = result + 1;%0A                if (newValue %3E 0x00FFFFFF) %7B%0A                    newValue = 1; // Roll over to 1, not 0.%0A                %7D%0A                if (sNextGeneratedId.compareAndSet(result, newValue)) %7B%0A                    return result;%0A                %7D%0A            %7D%0A        %7D else %7B%0A            return View.generateViewId();%0A        %7D%0A    %7D%0A%7D%0A

implement ViewCompat.generateViewId for backwards compatibility