Code example for RoundRectShape

0
 
	  // ¸®´Ï¾î ·¹À̾ƿôÀ» »ý¼ºÇÑ´Ù.  
	  mLinearLayout = new LinearLayout(this);
 
	  float [] array = new float [] { 20, 20, 20, 20, 20, 20, 20, 20};
	  ShapeDrawable rect = new ShapeDrawable(new RoundRectShape(array , null, null));
	  rect.setIntrinsicHeight(100);
	  rect.setIntrinsicWidth(200);
	  rect.getPaint().setColor(Color.BLUE);
 
	  ImageView i = new ImageView(this);
	  i.setImageDrawable(rect);	// ¿©±â¼­ ¹Ù·Î ¼³Á¤ÇÏ¸é µÈ´Ù. 
 
	  // ImageView¸¦ ·¹À̾ƿô¿¡ Ãß°¡ÇÑ´Ù. 
	  mLinearLayout.addView(i);
	  setContentView(mLinearLayout);
 
	} 
 
}