Java Code Examples for android.view.View.isOpaque()

The following are Jave code examples for showing how to use isOpaque() of the android.view.View class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: WechatChatroomHelper   File: BGASwipeBackLayout2.java   Source Code and License Vote up 7 votes
private static boolean viewIsOpaque(View v) {
    if (v.isOpaque()) {
        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;
}
 
Example 2
Project: WechatChatroomHelper   File: BGASwipeBackLayout.java   Source Code and License Vote up 7 votes
private static boolean viewIsOpaque(View v) {
    if (v.isOpaque()) {
        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;
}
 
Example 3
Project: letv   File: ViewCompatEclairMr1.java   Source Code and License Vote up 5 votes
public static boolean isOpaque(View view) {
    return view.isOpaque();
}
 
Example 4
Project: boohee_v5.6   File: ViewCompatEclairMr1.java   Source Code and License Vote up 5 votes
public static boolean isOpaque(View view) {
    return view.isOpaque();
}