开发者

increase the spacing between items in a List view in android

I am generating a listview as follows:

setListAdapter(new ArrayAdapter<String>(this, R.layout.row, fileListS));

in which "row" is the following xml file:

<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp"
android:textSize="14sp">
</TextView>

Is there an easy way to increase the spacing between the items lists in the generated listview? If I was using a ListView instead of Text开发者_如何学CView I guess I could use:

 android:dividerHeight="10.0sp"

But what can I do now that I use TextView?

Thanks,

TJ


You mean you want to change the thickness of the divider?

If so you could use a drawable similar the issues/solutions here

Using a Drawable Divider

Maybe a better answer

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜