blipinsk / FlippableStackView

An Android library introducing a stack of Views with the first item being flippable.
Apache License 2.0
810 stars 150 forks source link

4.1.2 click problem #12

Open sleith opened 8 years ago

sleith commented 8 years ago

I have samsung galaxy s3, with os 4.1.2. When i click on the button at a card, the click is not go to that shown card, instead somehow the click listener went to other card. I test on other devices but works fine. Any idea? thx

blipinsk commented 8 years ago

Hi @sleith I have heard of an issue like that once, but couldn't really recreate it.

vaniidroid commented 8 years ago

I am facing the same issue in OS 4.1.1. I called touch/click event in fragment's main framelayout and Log position(number) of the fragment instance. So when I tap on any card it called the last back visible card (fragment) click event. By tapping card 2,3,4,5... it calls click event of first card (fragment) and Log position 0.

Any help on this would be appreciated.

Thanks.

vaniidroid commented 8 years ago

If remove the code inside transformPage(View view, float position) method in StackPageTransformer.java, it calls correct click event of fragment i.e. top visible fragment's click event.

vaniidroid commented 8 years ago

Please let me know if any solution to resolve it.

Giosk commented 8 years ago

I found the same problem and also a solution. In my case I have three type of pages that are populated with text and images. During the filling of the data I set the OnClickListener on the items where the click is enabled otherwise I set the OnClickListener to null. I know that is a bit tricky, but now it works. Probably this would be a good solution also for you library @blipinsk .