【发布时间】:2013-07-12 17:32:31
【问题描述】:
有没有办法让TextView width 匹配复合可绘制宽度(XML)?
以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----] |
|-----------------|
【问题讨论】:
标签: android textview android-drawable xml-drawable