안드로이드 개발 정보
(글 수 1,069)
1) xml 레이아웃으로 적용하기
<Button
android:id="@+id/imageTextButton5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_launcher"
android:drawableBottom="@drawable/ic_launcher"
android:drawableLeft="@drawable/ic_launcher"
android:drawableRight="@drawable/ic_launcher"
android:text="Android"/>2) 코드로 적용하기
//---Button view---
Button btn = (Button) findViewById(R.id.imageTextButton6);
btn.setText("Android");
btn.setCompoundDrawablesWithIntrinsicBounds(
0, // left
R.drawable.ic_launcher, // top
0, // right
0); // bottom출처: http://ofps.oreilly.com/titles/9781118177679/





이런 옵션도 있었군요.