ShapeDrawable setIntrinsicHeight - top ranked examples from Open Source projects

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

This code example shows how to use the following methods:getPaint, setIntrinsicHeight, setIntrinsicWidth
This code example shows how to use the following methods:setIntrinsicHeight, setIntrinsicWidth
This code example shows how to use the following methods:setIntrinsicHeight, setIntrinsicWidth
This code example shows how to use the following methods:setIntrinsicHeight, setIntrinsicWidth
This code example shows how to use the following methods:getPaint, setIntrinsicHeight, setIntrinsicWidth
This code example shows how to use the following methods:getPaint, setIntrinsicHeight, setIntrinsicWidth
            p.lineTo(100,50);
            p.lineTo(0,50);
            p.lineTo(75,100);
            p.lineTo(50,0);    
             
            d = new ShapeDrawable(new PathShape(p, 100, 100));
            d.setIntrinsicHeight(100);
            d.setIntrinsicWidth(100);
            d.getPaint().setColor(Color.YELLOW);
            d.getPaint().setStyle(Paint.Style.STROKE);
            break; 
        case IDM_ARC:
            d = new ShapeDrawable(new ArcShape(0, 255));
            d.setIntrinsicHeight(100);
            d.setIntrinsicWidth(100);
            d.getPaint().setColor(Color.YELLOW);
            break; 
        } 
        mView.setDrawable(d);
        return true; 

6
CodeRank
This code example shows how to use the following methods:getPaint, setIntrinsicHeight, setIntrinsicWidth, setShape
This code example shows how to use the following methods:getPaint, setIntrinsicHeight, setIntrinsicWidth
package com.zauberlabs.android.api.piechart; 
 
import android.graphics.drawable.Drawable; 
import android.graphics.drawable.ShapeDrawable; 
import android.graphics.drawable.shapes.ArcShape; 
 
public class PortionFactory { 
	public static Drawable createPiePortion(float initAngle, float angle, int color){
		ShapeDrawable portion = new ShapeDrawable(new ArcShape(initAngle, angle));
		portion.setIntrinsicHeight(1000);
		portion.setIntrinsicWidth(1000);
		portion.getPaint().setColor(color);
		return portion;
	} 
} 

6
CodeRank
This code example shows how to use the following methods:getPaint, setIntrinsicHeight, setIntrinsicWidth
		Path path = new Path();
		path.moveTo((float) 0, (float) 0);
		//path.lineTo((float) 1, (float) 0.5); 
		path.lineTo((float) 1, (float) 0);
		PathShape pathShape = new PathShape(path, 1, 1);
		ShapeDrawable shape = new ShapeDrawable(pathShape);
		shape.getPaint().setColor(Color.WHITE);
		shape.getPaint().setStyle(Style.STROKE);
		shape.setIntrinsicWidth(20);
		shape.setIntrinsicHeight(15);
		return shape;
	} 
} 
6
CodeRank
This code example shows how to use the following methods:getPaint, setIntrinsicHeight, setIntrinsicWidth
	    super.onCreate(savedInstanceState);
 
	    // ¸®´Ï¾î ·¹À̾ƿôÀ» »ý¼ºÇÑ´Ù  
	    mLinearLayout = new LinearLayout(this);
 
	    ShapeDrawable oval = new ShapeDrawable(new OvalShape());
	    oval.setIntrinsicHeight(100);
	    oval.setIntrinsicWidth(100);
	    oval.getPaint().setColor(Color.RED);
 
	    ImageView i = new ImageView(this);
	    i.setImageDrawable(oval);	// ¿©±â¼­ ¼³Á¤ÇÏ¸é µÈ´Ù. 
	    // ImageView¸¦ ·¹À̾ƿô¿¡ Ãß°¡ÇÑ´Ù 
	    mLinearLayout.addView(i);
	    setContentView(mLinearLayout);
	} 
 
} 
6
CodeRank

Related ShapeDrawable setIntrinsicHeight Questions & Answers:

setIntrinsicHeight Method Overview
Sets the intrinsic (default) height for this shape.
See Code Examples for other Android ShapeDrawable Methods: