스마트기기개발관련/안드로이드 개발
[안드로이드] 특정 버튼 안에 이미지 넣기
AlrepondTech
2011. 5. 18. 11:21
반응형
=================================
=================================
=================================
출처: http://ezcocoa.com/?m=201101&paged=3
특정 버튼 안에 이미지 넣기
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);
=================================
=================================
=================================
반응형