0

I am looking for a way to display items horizontally in one row. I want to follow the format below.

 _____________________________________________________
|        |        |        |        |        |        |
|        |        |        |        |        |        |
|        |        |        |        |        |        |
|________|________|________|________|________|________|
|Scroll Bar Here______________________________________|

Does anyone know any methods or frameworks to achieve this?

Currently with the method I am using it is displaying as multiple rows.

Kieranmv95
  • 828
  • 4
  • 14
  • 31
raghavan
  • 39
  • 10
  • please use custom horizontal listview – Arun Antoney Jan 08 '15 at 10:15
  • 1
    Please provide more details regarding the scenario. – Bhavik Shah Jan 08 '15 at 10:17
  • i need to display set of images in list view, like in first row food images then second row health like that i need to display. and those images should be scroll horizontal – raghavan Jan 08 '15 at 10:20
  • @BhavikShah My problem, in list view i need to display group of images and title in one item, second item related to second group so on.. here am using gridview to implement this. is is right way..? – raghavan Jan 08 '15 at 10:32

1 Answers1

2

Based on your edit, I found this website that explain how to achieve an Horizontal ListView using a third part library (https://github.com/lucasr/twoway-view):

https://guides.codepath.com/android/Implementing-a-Horizontal-ListView-Guide

Here the layout:

enter image description here


Alternatively you could use a native HorizontalScrollView (which is a lot easier to implement):

enter image description here

This question solves the issue:

How to implement HorizontalScrollView like Gallery?

Here an youtube video of an HorizontalScrollView:

http://www.youtube.com/watch?v=0PAsR5sIi6E

Community
  • 1
  • 1
Eduardo Briguenti Vieira
  • 4,351
  • 3
  • 37
  • 49
  • Hi thanks for the answer, Here what i need is in vertical Listview i need to display images, Those images should be scroll horizontal. Please help me to over come this – raghavan Jan 08 '15 at 10:53
  • The link provided has the step by step to create a simple horizontal scrollable listView. To add images or other things, just use a more complex Adapter, but I recommend first create a simple horizontal listView first. – Eduardo Briguenti Vieira Jan 08 '15 at 11:08
  • Maybe an HorizontalScrollView is enough. See my edits. – Eduardo Briguenti Vieira Jan 08 '15 at 11:20
  • Now it is scrolling left side and right side in single line. How to display in ListView like above image Section1 and Section 2 – raghavan Jan 08 '15 at 13:57
  • This post may help: http://stackoverflow.com/questions/24058445/android-linearlayout-in-horizontalscrollview-with-multiple-rows – Eduardo Briguenti Vieira Jan 09 '15 at 10:43