android.support.v4.view.ViewCompat#isOpaque ( )源码实例Demo

下面列出了android.support.v4.view.ViewCompat#isOpaque ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: letv   文件: SlidingPaneLayout.java
private static boolean viewIsOpaque(View v) {
    if (ViewCompat.isOpaque(v)) {
        return true;
    }
    if (VERSION.SDK_INT >= 18) {
        return false;
    }
    Drawable bg = v.getBackground();
    if (bg == null) {
        return false;
    }
    if (bg.getOpacity() != -1) {
        return false;
    }
    return true;
}
 
源代码2 项目: AccountBook   文件: SlideFrameLayout.java
/**
 * 判断指定的View是否是不透明
 *
 * @param v
 * @return
 */
private static boolean viewIsOpaque(View v) {
    if (ViewCompat.isOpaque(v)) {
        return true;
    }

    // View#isOpaque didn't take all valid opaque scrollbar modes into account
    // before API 18 (JB-MR2). On newer devices rely solely on isOpaque above and return false
    // here. On older devices, check the view's background drawable directly as a fallback.
    if (Build.VERSION.SDK_INT >= 18) {
        return false;
    }

    final Drawable bg = v.getBackground();
    if (bg != null) {
        return bg.getOpacity() == PixelFormat.OPAQUE;
    }
    return false;
}
 
源代码3 项目: MiBandDecompiled   文件: SlidingPaneLayout.java
private static boolean f(View view)
{
    if (!ViewCompat.isOpaque(view))
    {
        if (android.os.Build.VERSION.SDK_INT >= 18)
        {
            return false;
        }
        Drawable drawable = view.getBackground();
        if (drawable != null)
        {
            if (drawable.getOpacity() != -1)
            {
                return false;
            }
        } else
        {
            return false;
        }
    }
    return true;
}
 
源代码4 项目: VCL-Android   文件: SlidingPaneLayout.java
private static boolean viewIsOpaque(View v) {
    if (ViewCompat.isOpaque(v)) return true;

    // View#isOpaque didn't take all valid opaque scrollbar modes into account
    // before API 18 (JB-MR2). On newer devices rely solely on isOpaque above and return false
    // here. On older devices, check the view's background drawable directly as a fallback.
    if (Build.VERSION.SDK_INT >= 18) return false;

    final Drawable bg = v.getBackground();
    if (bg != null) {
        return bg.getOpacity() == PixelFormat.OPAQUE;
    }
    return false;
}
 
源代码5 项目: ResideLayout   文件: ResideLayout.java
private static boolean viewIsOpaque(View v) {
    if (ViewCompat.isOpaque(v)) return true;

    // View#isOpaque didn't take all valid opaque scrollbar modes into account
    // before API 18 (JB-MR2). On newer devices rely solely on isOpaque above and return false
    // here. On older devices, check the view's background drawable directly as a fallback.
    if (Build.VERSION.SDK_INT >= 18) return false;

    final Drawable bg = v.getBackground();
    return bg != null && bg.getOpacity() == PixelFormat.OPAQUE;
}
 
源代码6 项目: adt-leanback-support   文件: SlidingPaneLayout.java
private static boolean viewIsOpaque(View v) {
    if (ViewCompat.isOpaque(v)) return true;

    // View#isOpaque didn't take all valid opaque scrollbar modes into account
    // before API 18 (JB-MR2). On newer devices rely solely on isOpaque above and return false
    // here. On older devices, check the view's background drawable directly as a fallback.
    if (Build.VERSION.SDK_INT >= 18) return false;

    final Drawable bg = v.getBackground();
    if (bg != null) {
        return bg.getOpacity() == PixelFormat.OPAQUE;
    }
    return false;
}
 
源代码7 项目: android-recipes-app   文件: SlidingPaneLayout.java
private static boolean viewIsOpaque(View v) {
    if (ViewCompat.isOpaque(v)) return true;

    // View#isOpaque didn't take all valid opaque scrollbar modes into account
    // before API 18 (JB-MR2). On newer devices rely solely on isOpaque above and return false
    // here. On older devices, check the view's background drawable directly as a fallback.
    if (Build.VERSION.SDK_INT >= 18) return false;

    final Drawable bg = v.getBackground();
    if (bg != null) {
        return bg.getOpacity() == PixelFormat.OPAQUE;
    }
    return false;
}
 
源代码8 项目: SlidingUpPaneLayout   文件: SlidingUpPaneLayout.java
private static boolean viewIsOpaque(View v) {
    if (ViewCompat.isOpaque(v)) return true;

    // View#isOpaque didn't take all valid opaque scrollbar modes into account
    // before API 18 (JB-MR2). On newer devices rely solely on isOpaque above and return false
    // here. On older devices, check the view's background drawable directly as a fallback.
    if (Build.VERSION.SDK_INT >= 18) return false;

    final Drawable bg = v.getBackground();
    if (bg != null) {
        return bg.getOpacity() == PixelFormat.OPAQUE;
    }
    return false;
}
 
源代码9 项目: UltimateAndroid   文件: SlidingLayout.java
private static boolean viewIsOpaque(View v) {
    if (ViewCompat.isOpaque(v)) return true;

    // View#isOpaque didn't take all valid opaque scrollbar modes into account
    // before API 18 (JB-MR2). On newer devices rely solely on isOpaque above and return false
    // here. On older devices, check the view's background drawable directly as a fallback.
    if (Build.VERSION.SDK_INT >= 18) return false;

    final Drawable bg = v.getBackground();
    if (bg != null) {
        return bg.getOpacity() == PixelFormat.OPAQUE;
    }
    return false;
}
 
源代码10 项目: V.FlyoutTest   文件: SlidingPaneLayout.java
private static boolean viewIsOpaque(View v) {
    if (ViewCompat.isOpaque(v)) return true;

    // View#isOpaque didn't take all valid opaque scrollbar modes into account
    // before API 18 (JB-MR2). On newer devices rely solely on isOpaque above and return false
    // here. On older devices, check the view's background drawable directly as a fallback.
    if (Build.VERSION.SDK_INT >= 18) return false;

    final Drawable bg = v.getBackground();
    if (bg != null) {
        return bg.getOpacity() == PixelFormat.OPAQUE;
    }
    return false;
}
 
源代码11 项目: guideshow   文件: SlidingPaneLayout.java
private static boolean viewIsOpaque(View v) {
    if (ViewCompat.isOpaque(v)) return true;

    // View#isOpaque didn't take all valid opaque scrollbar modes into account
    // before API 18 (JB-MR2). On newer devices rely solely on isOpaque above and return false
    // here. On older devices, check the view's background drawable directly as a fallback.
    if (Build.VERSION.SDK_INT >= 18) return false;

    final Drawable bg = v.getBackground();
    if (bg != null) {
        return bg.getOpacity() == PixelFormat.OPAQUE;
    }
    return false;
}
 
 同类方法