GithubHelp home page GithubHelp logo

Comments (15)

mikepenz avatar mikepenz commented on June 7, 2024

@CodeAbode are you sure you click correctly and don't move the finger out of the view or moved the view? Never experienced anything similar.

On which device with which android version did you get this issue?

Anyhow reproduceible?

from crossfadedrawerlayout.

mikepenz avatar mikepenz commented on June 7, 2024

From @CodeAbode on June 18, 2016 22:14

Thanks for the quick response. I am using this on api 23 and its quite a regularly occurence. Seems to work fine on my emulator but on my galaxy s7 it doesn't work. Note this is only the case when the draw is fully expanded. When it is a mini drawer all the clicks work all the time

from crossfadedrawerlayout.

mikepenz avatar mikepenz commented on June 7, 2024

From @CodeAbode on June 18, 2016 22:15

This also happens when the drawer icon is clicked. Sometimes it doesn't register and it must be clicked twice.

from crossfadedrawerlayout.

mikepenz avatar mikepenz commented on June 7, 2024

From @CodeAbode on June 18, 2016 22:53

Sorry for all the comments.

As for reproducing it use your demo Material Drawer app. It has the same issues with the CrossFadeDrawerLayout.

from crossfadedrawerlayout.

mikepenz avatar mikepenz commented on June 7, 2024

@CodeAbode thank you for the comments you made, and for the effort you put into providing all the comments.

But I am afraid I have to give you an answer you do not really want to hear.

I assume that your issue is a device (or OS (samsung)) related one, as you have the same issue for the drawer icon. Which is not handled by the MaterialDrawer.

It's the ActionBarDrawerToggle directly from the appcompat libs.

For the items in the drawer itself, they have a normal OnClickListener set on the itemView nothing which can be changed there. So if the listener is not called, it's an OS issue. So maybe a issue from Samsung, or yeah. perhaps also the device screen or the touch is broken?

from crossfadedrawerlayout.

mikepenz avatar mikepenz commented on June 7, 2024

From @CodeAbode on June 19, 2016 15:51

@mikepenz

This may be an issue I should have posted in the CrossfadeDrawerLayout. I have not looked a lot into your code but I think its an issue with the drawer closing.

If the crossfade drawer is expanded it registers a touch event as if you were sliding the drawer so the OnItemClick is never triggered. You have to play with it a bit but basically whatever is capturing the drawer to slide back to a compact state is taking control over an OnItemClick event.

from crossfadedrawerlayout.

mikepenz avatar mikepenz commented on June 7, 2024

@CodeAbode seems like your assumption with the CrossfadeDrawerLayout is right. Weird enough is that I have not modified the original closeDrawers function and just call this one, after the item was clicked. Which should theoretically do the same as the drawer does internally.

One thing could be really true, that you may slide a bit so it is not detected as click. But it is really hard to reproduce this one.

Its a lot easier to reproduce the ActionBarDrawerToggle not fireing issue, just select an item in the normal drawer, and it won't work. but it works if the mini drawer is clicked.

from crossfadedrawerlayout.

mikepenz avatar mikepenz commented on June 7, 2024

To be honest I have no idea why it reacts like this. I tried to close the drawer inside a handler tried to sync the state of the ActionBarDrawerToggle tried to set the full drawers view to INVISIBLE instead of GONE. Tried to close the drawer via different APIs and so on. Nothing really changes the behavior.

from crossfadedrawerlayout.

mikepenz avatar mikepenz commented on June 7, 2024

From @CodeAbode on June 19, 2016 19:34

I'll dive into your code and trying playing with it over the next week

from crossfadedrawerlayout.

mikepenz avatar mikepenz commented on June 7, 2024

@CodeAbode yes. :/ I can't describe what possibly could go wrong here.

from crossfadedrawerlayout.

mikepenz avatar mikepenz commented on June 7, 2024

@CodeAbode we may should move this to the CrossfadeDrawerLayout

from crossfadedrawerlayout.

mikepenz avatar mikepenz commented on June 7, 2024

@CodeAbode you have found out something?

from crossfadedrawerlayout.

mikepenz avatar mikepenz commented on June 7, 2024

@CodeAbode after some more debugging. It seems to be a bug in the DrawerLayout itself. If I disable all animations when closing the drawer (overwriting all closeDrawer methods and set animation to false) it works without problems.

It is also interesting to note that it will work with animation if I set a breakpoint into the onViewDragStateChanged method Line 2088 inside the DrawerLayout, that it will work without problems.

Seems like some kind of race condition happens there.

from crossfadedrawerlayout.

mikepenz avatar mikepenz commented on June 7, 2024

Oh after some more debugging I found out why it was working without animation, and with debugging in this method. It was related to the lp.onScreen being < 0 (which is the param used to identify if onDrawerClosed has to be called which will refresh the state of the ActionBarDrawerToggle) So it came to my mind that maybe the animation for crossfading is playing during the animation for closing the DrawerLayout which results in a lp.onScreen < 0 and I was right. So the simple fix was to just clear the animation of the mContainer in all closeDrawer methods for the CrossfadeDrawerLayout.

The fix is in the newest version

from crossfadedrawerlayout.

wilsonhws avatar wilsonhws commented on June 7, 2024

Hi, i have tried your latest version, but the problem still remains, my phone is samsung S7 edge running on android 7.0, sony xperia Z3 on android 6.0.1, HTC oneX android 4.2.2

But it works on oneplus 3 on android 8.0 and honor 6 android 4.4.

from crossfadedrawerlayout.

Related Issues (16)

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.