2012-11-23 76 views

回答

3

简单而简单。

创建一个九个补丁drawable。幸运的是,我有东西为你准备好:保存图像

bottom border as a nine patch for Android layouts

。如果您不了解将哪些概念应用于此图像(我的意思是背后那些小黑条背后的原因),您应该了解nine patch drawables

将此图像作为png结尾于.9.png。请注意点-9点png的扩展名。假设您将其保存为grey_border_inset_bottom.9.png。然后,转到您的TextView并将此:

android:background="@drawable/grey_border_inset_bottom" 

完成。底部边框。