Comments (5)
I would recommend 2 different components: one big component for the stream and a separate one for the grid. You can use constraint layout to constrain each component to 50% of the screen width or something like that.
This library was not built for use cases like these unfortunately.
I recommend this layout structure for this case if you need scrollable content:
- Vertical DpadRecyclerView
- CustomHorizontalLayout with ConstraintLayout
- LiveStreamComponent
- GridComponent (DpadRecyclerView)
Please let me know if this was useful
from dpadrecyclerview.
Thank you for your help, I will give it a try.
from dpadrecyclerview.
It works like a charm! Thank you for your great help!
I have two more question:
- How can I disable the default selection? I want the grid have no choice at first until user turn their focus on it.
- I find alignment function part of this library (and the explaination of the documentation) a little bit incomprehensible, my understanding is that Child Alignment is to determine where are the anchors of the viewholders, but what about Parent Alignment? Is it define the anchor of the whole list (or grid) to alignment with the parent view (which means DpadRecyclerView itself) ? If so, why should I not simply add a header or footer to achieve the same goal (as far as I concerned)? Also I have a little confuse about the api arguments, what does includingPadding and alignToBaseline mean? There are no documentation about this and I read through the source code still cannot figure it out.
Please forgive my bad English, hope hearing from you soon.
from dpadrecyclerview.
Hi. I'm glad I could help.
Regarding your points:
How can I disable the default selection? I want the grid have no choice at first until user turn their focus on it.
Currently, this is not possible. You can ignore doing something on selection changes without focus by checking if the recyclerview.hasFocus
is false, if that's what you're looking for.
but what about Parent Alignment?
Please check the recipes here: https://rubensousa.github.io/DpadRecyclerView/recipes/alignment/
Let me know if these docs are not enough and I will try to add them in the near future.
from dpadrecyclerview.
Thank you, my problems are solved at all!
from dpadrecyclerview.
Related Issues (20)
- Did you find a solution for the Grid focus problem? HOT 10
- Add navigation sound when searching for new view
- Add support for long text scrolling
- Scroll jumps to the top on item's layout update HOT 7
- Scroll position start question HOT 14
- Nested vertical lists HOT 1
- Vertical list with focus centered HOT 2
- IndexOutOfBoundsException but I can't reproduce it. HOT 5
- Touch behavior in scrolling HOT 5
- help HOT 2
- Focus issue after touch event
- Update compose integration now that view-interop is fixed
- Allow skipping layout requests during scroll
- Expose ViewHolder focus state
- Add support for custom parent alignment based on ViewHolder position
- Add support for linear circular focus
- Gridrecyclerview with height 0.5 of the screen height - alignment problem (last row cut off) HOT 14
- First item of first row is smaller then all the others HOT 4
- Fast scrolling - loosing focus when having images from an url in the items HOT 21
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dpadrecyclerview.