2013-02-28 36 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" />