2
어쨌든 TextView width
일치하는 컴파 운드 Drawable width (XML)? TextView 너비 일치 drawable 상단 너비
는 XML 코드에 대한 예를 들어 :
<TextView
android:id="@+id/textView"
style="@style/TextIcons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/icon_contact"
android:gravity="center"
android:lines="2"
android:text="@string/contact_label" />
내가 얻을 :
|---------------------|
| |-------------| |
| | | |
| | Drawable | |
| | View | |
| | | |
| |-------------| |
|[---Contact Label---]|
|---------------------|
하지만 내가 진정으로 원하는 것은 :
|-----------------|
| |-------------| |
| | | |
| | Drawable | |
| | View | |
| | | |
| |-------------| |
| [---Contact---] |
| [----Label----] |
|-----------------|
그것은 작동하지만 실제로 내가 정렬 두 줄이 남아있어, 센터 필요합니다. – GLopez
TextView에 android : gravity = "center"만 추가했습니다. 감사합니다. 나는 더 단순한 것을 선호 하겠지만 외모는 선호하지 않습니다. – GLopez