Android RecycleViewer with multiple horizontal lists - android

I have been trying to implement horizontal lists inside a RecycleView and have a working single horizontal list thenks to this answer https://stackoverflow.com/a/45953855, can anyone advise on the required modifications to have multiple horizontal lists based on the provided example?
Cheers
Phil

Take 1 Recyclerview Vertical.
Now inside the cell of the recyclerview place second recyclerview Horizontal.
Now set every recyclerview(vertical) items(cells) with adapter and it will work fine with vertical and horizontal data.
if you find any query, let me know i would help you.

Related

How to implement Horizontal Scroll View inside a simple ListView?

I am trying to implement Horizontal Scroll View inside a simple List View. The elements inside the horizontal scroll view are texts over images.
I know I need to create the adapter and the getter & setter class as well for horizontal Scrolling elements.
Also, the URLs of the images are stored in a string array. But I am not sure how to implement that.
Can any one suggest a good example for this?
Thanks in advance.
Before requesting for answer make sure you try to implement/google it.
I would suggest you to use RecyclerView instead of ListView.
For your requirement you will need two Adapters one for your parent RecyclerView and another for your item if RecyclerView.
Refer the link. It'll help you to achieve what you want
Use RecyclerView with LinearLayoutManager and orientation to HORIZONTAL

Dynamic linear layout logic for given below image

In my application, I need to design layout like given in a picture. The portion in red which have 3 views with green circle which will be dynamic. It can be 2 or 3 or 4 as I said it is dynamic. So please help to make logic of that or please suggest me how can I do that
Use the gridview or recyclerview with gridlayoutmanager with number of column 2.
Use two ListViews
segregate your data so that even numbers go in the left listview, and odds in the right listivew
I solved my problem by creating TableLayout dynamically with some logic with arraylist in adapter.If anybody needs it I can also guide.
GridView is not the right solution because under listview it is not scrollable dut to parent scroll property.

Horizontal scroll with gridview

Now i have to create a horizontal listview again, this time i want to find a better library for this, as far as i know android did not have a horizontal listview, and then i read this
http://developer.android.com/design/building-blocks/grid-lists.html
They mention if gridview can scroll horizontally, they even illustrated it with a picture. I try to find example of how to use gridview horizontally, but i have no luck,
is anyone here can help me how to use gridview scroll horizontally?
This is the best library for two way grid. I have used it and it works perfectly.
https://github.com/jess-anders/two-way-gridview
I'm end up using recyclerview as #tyczj recommend

Make horizontalscrollview auto scrolling

I have multiple textviews inside a horizontalscrollview. Now I want to scroll all the textviews inside it so that all multiple textviews gets displayed. How can I achieve it ?
Thanks in advance.
Here is one git project. Its a scroller the scroll automatically and continously. It was made to show a credits screen by continously scrolling through a list of images.
This might help you or give you some idea.
https://github.com/blessenm/SlideshowDemo

Both way scrollable gridview in android

Is it possible to allow a griview to scroll both vertically and horizontally simultaneously in android? Please advise.
It doubt that would be possible. A GridView is based on an ArrayAdapter, having only 1 dimension for the items. How would you arrange them in a view that can be extended both vertically and horizontally?
Of course, if you just want to make it larger than the screen and use hard-coded number of rows/columns, you can put it in another scrollable view.
There are following two solutions and you can use one which fits your requirement.
You can use RecyclerView instead of GridView with a custom layout manager. You can read this code for help. Also, you can read this article on how to create custom layout manager. This article gives an example of how to create two-way scrolling grid layout.
The other solution is to use RecyclerView with horizontal scrolling Grid Layout wrapped inside a scroll view.
<ScrollView>
<RecyclerView />
</ScrollView>
use GridLayoutManager with horizontal scroll for recycler view.
The first solution is efficient in a way that it handles view recycling properly.
Hope this will help.

Categories

Resources