I have a custom list view which contains 14 fields.Something like this:
field1 field2 field3 field4 field5 field6 field7 field8 field9 field10 field11 field12 field13 field14. Now the obvious problem is that is no possible way i can fit all the fields on the screen,so i would like to make the entire list view scroll horizontally,so i could display only 5-6 fields,and when the user scrolls horizontally he will be able to see the rest of them. I is possible to have a list view that scrolls both vertically and horizontally?
simply create list view inside the horizontal scroll view, skeleton as follows
<HorizontalScrollView ...........>
<LinearLayout ......>
<LinearLayout ......>
//List View Titles will be here
</LinearLayout>
<ListView ........ android:layout_weight="1" />
</LinearLayout>
</HorizontalScrollView>
Here, If you need to show non-scroll-able title to list view then add it in separate layout as like mentioned and don't forget to set layout_weight attribute.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With