two-way-gridview | Android GridView that can be configured to scroll | RecyclerView library
kandi X-RAY | two-way-gridview Summary
kandi X-RAY | two-way-gridview Summary
An Android GridView that can be configured to scroll horizontally or vertically. I should have posted this over a year and a half ago, but never got around to it. I needed a grid view that in portrait would scroll vertically, but in landscape, would scroll horizontally. I thought I could try hacking up the Gallery, but that never works out well, and if GridView could really be configured to scroll any direction, it would just be so much easier. So I built it one weekend. Lots of left, right, top, bottom changes, but the end result is a really useful UI widget. Feel free to use it in your apps, according to the Apache 2.0 license. Also feel free to fork it and improve it. You could fairly easily create a horizontal listview by extending TwoWayAbsListView.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Called when a grid is selected
- Set the current selection position
- Sets the initial filter
- Display popup
- Draws this track
- Draws the track
- Draws the thumb
- Called when the layout has changed
- Searches for a position in the adapter
- Implement the layout of the RecyclerView
- Computes the offset of the vertical scrollbar depending on the view
- Reclaims all views held by this one
- Override to create a drawable state
- Computes the extent of the vertical scrollable view
- Computes the extent of the horizontal scrollable view
- Compute the offset based on the scrollbar
- Initialize AbsListView
- Re - applies the drawable to the specified canvas
- Check the consistency of the view
- Computes the extent of the view horizontally
- Updates the visibility indicators depending on the list view
- Called when data has changed
- Restore the state of a saved instance
- Handles the restore state
- Obtains a view which corresponds to the specified position
- Computes the extent of the scrollable view
two-way-gridview Key Features
two-way-gridview Examples and Code Snippets
Community Discussions
Trending Discussions on two-way-gridview
QUESTION
I read a post (How to make grid-view horizontally scrollable in android) and I tried everything the responses say, but I couldn't manage to make a horizontal gridview with 3 rows.
The closest I could get was using this: https://developer.android.com/reference/android/support/v17/leanback/widget/HorizontalGridView.html , and it has a big bug in which you can't set the number of rows with setNumRows(int) since it makes the horizontalgridview infinitly scrollable vertically.
I also considered the option of rotating a normal gridview 270 degrees but it gives me a lot of problems since I want an all margin of 10dp in the gridview.
And I also tried the TwoWay Gridview of github (https://github.com/jess-anders/two-way-gridview) but it didn't work either.
Same with this video tutorial: https://www.youtube.com/watch?v=94rCjYxvzEE
Please help me.
...ANSWER
Answered 2018-Apr-12 at 14:13I ended up doing it by using a recycle view and setting a gridlayoutmanager to it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install two-way-gridview
You can use two-way-gridview like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the two-way-gridview component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page