0

In my layout I need a custom list view like a box type.

How can do that ?

My XML:

   <LinearLayout
     android:layout_width="fill_parent"
     android:layout_height="317dp"
     android:gravity="top"
     android:orientation="vertical"
     android:background="@android:color/transparent"
    >

     <ListView android:id="@+id/slistview" 
        android:layout_height="fill_parent"
        android:layout_width="fill_parent"
        android:divider="#2867EA"
        android:dividerHeight="1dp"
        android:cacheColorHint="#00000000"
        >
     </ListView>

 </LinearLayout>     
3
  • 5
    have a custom adapter inflate a custom layout for each row and set the adapter to listview. androidhive.info/2012/02/… Commented Jun 18, 2013 at 7:49
  • use custom adapter like this abhiandroidinfo.blogspot.in/2013/05/… Commented Jun 18, 2013 at 7:51
  • box type? could you insert any picture sample? Commented Jun 25, 2013 at 12:17

3 Answers 3

2

You should create custom list adapter and supply xml layout for each row. here's a comprehensive tutorial that fits your needs:

Link

Sign up to request clarification or add additional context in comments.

Comments

0

You can use customBaseadapter and viewHolder ...

1 Comment

for multiline listview ..good tutorial here .. [link]vaibhavadhyapak.blogspot.in/2013/01/…
0

Create a xml for row of the list view and set the background of the row and create a custom adapter and set adapter to list view.

custom list view

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.