Giter VIP home page Giter VIP logo

Comments (5)

rubensousa avatar rubensousa commented on July 19, 2024

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.

RavioliWonton avatar RavioliWonton commented on July 19, 2024

Thank you for your help, I will give it a try.

from dpadrecyclerview.

RavioliWonton avatar RavioliWonton commented on July 19, 2024

It works like a charm! Thank you for your great help!
I have two more question:

  1. How can I disable the default selection? I want the grid have no choice at first until user turn their focus on it.
  2. 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.

rubensousa avatar rubensousa commented on July 19, 2024

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.

RavioliWonton avatar RavioliWonton commented on July 19, 2024

Thank you, my problems are solved at all!

from dpadrecyclerview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.