Giter VIP home page Giter VIP logo

Comments (19)

rubensousa avatar rubensousa commented on July 19, 2024 1

Fix should be here: #219

from dpadrecyclerview.

rubensousa avatar rubensousa commented on July 19, 2024 1

@tyrel-carlson that's exactly what I did in #219
I plan to release this soon

from dpadrecyclerview.

rubensousa avatar rubensousa commented on July 19, 2024 1

@tyrel-carlson

Thanks for the feedback. I will make focusOutFront and focusOutBack enabled by default in the next release.

Regarding the grid focus, I think that makes sense, I will open a new issue and solve that as well

from dpadrecyclerview.

tyrel-carlson avatar tyrel-carlson commented on July 19, 2024

FYI, I have fixed it using recycler.setSmoothScrollMaxPendingMoves(0)

from dpadrecyclerview.

rubensousa avatar rubensousa commented on July 19, 2024

Hi @tyrel-carlson. Which version of the library are you using? Please give me the entire configuration of your adapter and number of rows/columns that have a section header. This is a continuation of this issue, right? #210

from dpadrecyclerview.

tyrel-carlson avatar tyrel-carlson commented on July 19, 2024

Hi @tyrel-carlson. Which version of the library are you using? Please give me the entire configuration of your adapter and number of rows/columns that have a section header. This is a continuation of this issue, right? #210

I'm using the latest version 1.3.0-alpha03. I suggest including a new fragment using SpanSizeLookup in the sample project. That would be a good practice to have it to detect any issues.

from dpadrecyclerview.

rubensousa avatar rubensousa commented on July 19, 2024

Could you do me a favor and check https://github.com/rubensousa/DpadRecyclerView/pull/219/files#diff-50cbcf55268ef507b233dc6a02a723b8ada87fc2f470ff8e834534ee090be7f8 and the branch span_size_focus? You can checkout the project on your machine and help me with testing that it's working as you expected

from dpadrecyclerview.

tyrel-carlson avatar tyrel-carlson commented on July 19, 2024

Sure, I will check it

from dpadrecyclerview.

tyrel-carlson avatar tyrel-carlson commented on July 19, 2024

I have tested the branch. Grids > Span Headers works fine on my emulator.

from dpadrecyclerview.

rubensousa avatar rubensousa commented on July 19, 2024

@tyrel-carlson thanks! I will add some UI tests and then ship the release

from dpadrecyclerview.

rubensousa avatar rubensousa commented on July 19, 2024

Released in 1.3.0-alpha04. Please try it out

from dpadrecyclerview.

tyrel-carlson avatar tyrel-carlson commented on July 19, 2024

Did you change any dependencies in this release? After syncing I get some errors on my dispatchKeyEvent overridden functions in other files.

from dpadrecyclerview.

rubensousa avatar rubensousa commented on July 19, 2024

@tyrel-carlson yes, I updated RecyclerView to the latest version. They added an override to dispatchKeyEvent with nullable annotation: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java;l=1977

from dpadrecyclerview.

rubensousa avatar rubensousa commented on July 19, 2024

@tyrel-carlson was everything fine with the newest version?

from dpadrecyclerview.

tyrel-carlson avatar tyrel-carlson commented on July 19, 2024

I'm going to update to the newest version soon. I will update you once I've tested the changes.

from dpadrecyclerview.

tyrel-carlson avatar tyrel-carlson commented on July 19, 2024

I've tested new version, I can confirm that reported bugs are fixed, but there are two more issues there:

  • when we have one item in a row and the right cells of the item is empty, right arrow will move the focus to second item on the next row. for example lets say we have this view:
[0         ] -> header
[1][ ][ ][ ] -> first row
[2         ] -> header
[3][4][ ][ ] -> second row

when we move right from position = 1, it focuses item with position = 4

  • the other issue is when I go up from first row, it won't focus the parent which is the top menu, I'm not sure if this behavior should be the default one.

I have fixed both of these issue, but you may want to fix them as well.

from dpadrecyclerview.

rubensousa avatar rubensousa commented on July 19, 2024

when we have one item in a row and the right cells of the item is empty, right arrow will move the focus to second item on the next row. for example lets say we have this view:

What's your expected state in that scenario? Would you prefer to not focus position 4? The default focus search from the system kicks-in when there's no focusable view at the focus direction, in that case the system finds position 4 because it's at the right side of position 1.

the other issue is when I go up from first row, it won't focus the parent which is the top menu, I'm not sure if this behavior should be the default one.

Are you using these?

image

Please try setFocusOutAllowed(throughFront = true, throughBack = false) and let me know if it works

from dpadrecyclerview.

tyrel-carlson avatar tyrel-carlson commented on July 19, 2024

I have used setFocusOutAllowed(throughFront = true, throughBack = false) and that works fine. thanks

for the other issue, I expect the focus to remain unchanged, since there is no cell at the right of the cell. here is the code I'm using to prevent this behavior:

View.FOCUS_RIGHT -> {
    // Prevent unusual focus movement if the right cell is empty
    val nextPosition = currentPosition + 1
    if (getSpanIndex(nextPosition, spanCount) <= currentSpanIndex) currentPosition else nextPosition
}

and also I see if we move right from other columns (second or third column for example) focus remains unchanged. So there should be same behavior for all movements to the right.

from dpadrecyclerview.

rubensousa avatar rubensousa commented on July 19, 2024

@tyrel-carlson both fixes are now available in 1.3.0-beta01

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.