public static String getViewGroupTypeByReflect(View view) {
        Class<?> compatClass;
        String viewType = SnapCache.getInstance().getCanonicalName(view.getClass());
        compatClass = ReflectUtil.getClassByName("android.support.v7.widget.CardView");
        if (compatClass != null && compatClass.isInstance(view)) {
            return SAViewUtils.getViewType(viewType, "CardView");
        }
        compatClass = ReflectUtil.getClassByName("androidx.cardview.widget.CardView");
        if (compatClass != null && compatClass.isInstance(view)) {
            return SAViewUtils.getViewType(viewType, "CardView");
        }
        compatClass = ReflectUtil.getClassByName("android.support.design.widget.NavigationView");
        if (compatClass != null && compatClass.isInstance(view)) {
            return SAViewUtils.getViewType(viewType, "NavigationView");
        }
        compatClass = ReflectUtil.getClassByName("com.google.android.material.navigation.NavigationView");
        if (compatClass != null && compatClass.isInstance(view)) {
            return SAViewUtils.getViewType(viewType, "NavigationView");
        }
        return viewType;
    }
@Test
    public void getViewGroupTypeByReflect() {
        LinearLayout linearLayout = new LinearLayout(mApplication);
        Assert.assertEquals("android.widget.LinearLayout",
                SAViewUtils.getViewGroupTypeByReflect(linearLayout));
    }