2013-02-28 50 views
0

我只是想知道如何做这样的事情: enter image description here的TextView与底部绘制自定义行

谢谢

+0

设计一样,或者有什么布局? – 2013-02-28 14:37:03

+0

嘿两种方法来做到这一点1)获取佛罗里达弧的图像2)为semi-semi圈创建一个xml,并在layout.xml中创建一个视图,并将此xml作为视图的背景。 – Droidee 2013-02-28 14:46:38

回答

0

设置drawableBottomTextView像:

<TextView 
     android:id="@+id/my_txt" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:drawableBottom="@drawable/my_drawable" /> 

,其中my_drawable位于你的资源文件夹中,那就是你想要的TextView下的绿线。

+0

thx!我的第一个想法是让它画线,但照片应该使它:) – eento 2013-02-28 15:24:32

+0

它将需要更多的时间来绘制,而不是只使用PNG文件,并将其附加到您的textview。 :) – hardartcore 2013-02-28 15:25:28

0

您可以android:drawableBottom="@drawable/YourDrawing"

像下面这样做..

<TextView 
      android:id="@+id/TV" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="23:00" 
      android:drawableBottom="@drawable/YourDrawing" 
      android:textAppearance="?android:attr/textAppearanceMedium" 
      android:textColor="@color/blue" 
      android:textStyle="bold" />