Code example for PathShape

0
	  p.moveTo(100, 100);
	  p.lineTo(50, 150);
	  p.lineTo(100, 200);
	  p.lineTo(100, 100);
 
	  ShapeDrawable shape = new ShapeDrawable(new PathShape(p, 200 , 200));
	  shape.setIntrinsicHeight(300);
	  shape.setIntrinsicWidth(300);
	  shape.getPaint().setColor(Color.MAGENTA);
 
	  ImageView i = new ImageView(this);
	  i.setImageDrawable(shape);	// ¿©±â¼­ ¹Ù·Î ¼³Á¤ÇÏ¸é µÈ´Ù. 
 
	  // ImageView¸¦ ·¹À̾ƿô¿¡ Ãß°¡ÇÑ´Ù. 
	  mLinearLayout.addView(i);
	  setContentView(mLinearLayout);
 
	} 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java