2011-02-19 68 views
4

我正在使用drawableRight属性在TextView旁画一条线。表中有许多TextView,我想要的只是列分隔符。继承人的TextView代码:在Android中可右键绘制。不工作

<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="units" 
    android:drawablePadding="2pt" 
    android:drawableRight="@drawable/linetable" 
    android:gravity="center" 
    android:layout_margin="2pt" 
    android:padding="2pt" /> 

Linetable代码

<shape xmlns:android="http://schemas.android.com/apk/res/android" 
     android:shape="line"> 

     <solid android:color="#000000"></solid> 
     <stroke 
      android:width="2pt" 
      android:color="#000000" 
      android:dashWidth="8pt" 
      android:dashGap="8pt"/> 

</shape> 

所以我预计将吸引所有TextViews旁边一列,这可能看起来像一列边框。但它没有工作。

这些图像显示了我想要达到的目标以及我所取得的成就。

我只是需要指导。谢谢。

The Spinner in the image is what I am trying to make What I have achieved so far

回答