我已经创建了一个xml虚线,如How do I make a dotted/dashed line in Android?中所述。如果我使用它作为我的TextView的背景,它会显示出来。在android中使用xml虚线TextView
<TextView
android:id="@+id/segment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/dotted_lines"
android:gravity="left"
android:text="First segment"
android:textSize="12sp" />
但是,如果我使用它作为附带的drawable,它不会显示出来。
<TextView
android:id="@+id/segment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawableBottom="@drawable/dotted_lines"
android:gravity="left"
android:text="First segment"
android:textSize="12sp" />
从本质上讲,我一点也不在乎无论哪种方式,不同的是:我需要的虚线出现在TextView的文本的下方。请帮忙。
我想这可能帮助you..http://stackoverflow.com/questions/10020466/android-4-0-sub-title-section-label-styling LQ = 1 –