public static int indexInParentGroup(final View v) {
        if (v == null || !(v.getParent() instanceof ViewGroup)) {
            return -1;
        }
        return ((ViewGroup) v.getParent()).indexOfChild(v);
    }
Wrapper for the ContextThemeWrapper, so we can remember the style/theme id. Should SOLELY be used by method @{link {@link #wrap(Context)}}!
main/src/main/java/cgeo/geocaching/ui/ViewUtils.java