Drawable isVisible - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Drawable isVisible method.

This code example shows how to use the following methods:getOpacity, isVisible
    /** 
     * @see android.graphics.drawable.Drawable#getOpacity() 
     */ 
    @Override 
    public int getOpacity() { 
        return ((null == icon) || (!icon.isVisible()))
            ? PixelFormat.TRANSPARENT
            : icon.getOpacity();
    } 
 
    /** 
     * @see android.graphics.drawable.Drawable#setAlpha(int) 
     */ 
    @Override 
    public void setAlpha(int alpha) {
        if (null != icon) { icon.mutate().setAlpha(alpha); }
    } 
 
    /** 
     * @see android.graphics.drawable.Drawable#setColorFilter(android.graphics.ColorFilter) 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getBounds, isVisible
	} 
	 
	//return true if event is in bounds of the key 
	public boolean isEventInBounds(MotionEvent event)
	{		 
		if(!keyShape.isVisible())
			return false; 
		 
		Rect bounds = keyShape.getBounds();
 
		int X = (int)event.getX();
		int Y = (int)event.getY();
			 
		///TODO: Check for Shape intersection, not just Rect 
		if(bounds.contains(X, Y))
		{ 
			return true; 
		} 
				 
		return false; 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:isVisible
        return mCurrDrawable != null ? mCurrDrawable.getMinimumWidth() : 0;
    } 
 
    @Override 
    public int getOpacity() { 
        return mCurrDrawable == null || !mCurrDrawable.isVisible() ? PixelFormat.TRANSPARENT :
                mDrawableContainerState.getOpacity();
    } 
 
    @Override 
    public boolean getPadding(Rect padding) {
        final Rect r = mDrawableContainerState.getConstantPadding();
        if (r != null) {
            padding.set(r);
            return true; 
        } 
        if (mCurrDrawable != null) {
            return mCurrDrawable.getPadding(padding);
        } else { 
            return super.getPadding(padding);
4
CodeRank
Experience pair programming with AI  Get Codota for Java
isVisible Method Overview
See Code Examples for other Android Drawable Methods: