2010년 3월 15일 월요일

안드로이드 버튼에 아이콘 넣기

Button button = new Button(mContext);
button.setText("Close");
Drawable close = Drawable.createFromPath("/data/icon/image.png");
close.setBounds(0, 0, close.getIntrinsicWidth(), close.getIntrinsicHeight());
button.setCompoundDrawables(close, null, null, null);

댓글 1개: