开发者

Right Drawable in Android. Not Working

I am drawing a line beside a TextView using the drawableRight property. There are a number of TextViews in the table and all I want is column divider. Heres the TextView code:

<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" />

L开发者_如何学编程inetable Code:

<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>

So I expected to draw a column beside all TextViews and this may look like a column border. But it isnt working.

The images show what I am trying to achieve and what I have achieved.

I just need guidance. Thank You.

Right Drawable in Android. Not Working

Right Drawable in Android. Not Working


You can use android-wheel.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜