Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoscrool freezes on Samsung devices #8

Open
alaattinturyan opened this issue Aug 6, 2014 · 8 comments
Open

Autoscrool freezes on Samsung devices #8

alaattinturyan opened this issue Aug 6, 2014 · 8 comments

Comments

@alaattinturyan
Copy link

Hi,

We are experiencing an issue on most of Samsung devices. System trigger garbage collector (GC_EXPLICIT) on each almost 2 second and that make the flow animation freezes.
Even in sample application, issue occurs.

I have attached some ADB logs below.

08-05 17:02:51.474 17876-17876/com.jpardogo.android.listbuddies D/dalvikvm﹕ GC_EXPLICIT freed 8621K, 71% free 40216K/136168K, paused 3ms+5ms, total 36ms
08-05 17:02:53.504 17876-17876/com.jpardogo.android.listbuddies D/dalvikvm﹕ GC_EXPLICIT freed 648K, 71% free 40214K/136168K, paused 2ms+4ms, total 37ms
08-05 17:02:56.034 17876-17876/com.jpardogo.android.listbuddies D/dalvikvm﹕ GC_EXPLICIT freed 3117K, 71% free 40210K/136168K, paused 3ms+5ms, total 33ms
08-05 17:02:58.034 17876-17876/com.jpardogo.android.listbuddies D/dalvikvm﹕ GC_EXPLICIT freed 643K, 71% free 40210K/136168K, paused 2ms+5ms, total 32ms
08-05 17:03:00.024 17876-17876/com.jpardogo.android.listbuddies D/dalvikvm﹕ GC_EXPLICIT freed 8618K, 71% free 40212K/136168K, paused 2ms+4ms, total 32ms

Thanks.

@jpardogo
Copy link
Owner

jpardogo commented Aug 7, 2014

I don't have any Samsung devices but I have been testing with Genymotion emulator (Samsung Galaxy S4 - Android 4.3) and It didn't happen. I will try to create an AVD and replicate a samsung device. What devices did you test?

@alaattinturyan
Copy link
Author

I have tested on several Samsung device like Samsung Galaxy S4,S5, Mega, S4 Mini. All of them has the same issue.

I have found what cause this issue. GC_EXPLICIT caused by SmoothScrollBy(..) For Samsung devices in this case, it's better to refactor your code to SetSelectionFromTop(..)

@mentoranto
Copy link

I'm having the same issue on Galaxy S4 and S3 (I9300)

@zhanghai
Copy link

Also confirmed on my Samsung Galaxy S4 (I959).

@jpardogo
Copy link
Owner

I had a bit of time today and I was looking into the issue. As I said I don't have any samsung device with me, but I am changing scrollBy for setSelectionFromTop and I hope you guys can test when it is done.

I made it work with something like this, where speed would be -/+ depending if the scroll is up or down.

mListViewLeft.setSelectionFromTop(mListViewLeft.getFirstVisiblePosition(), mListViewLeft.getChildAt(0).getTop() - mSpeedLeft);

I am just playing around checking what is the best option, and I found some other problems with this implementation. So I will write back here when I can find a moment to finish this thing.

I will commit the branch of this issue (where I am actually playing so far) as iss-samsung, so you can take a look at the code, and play with it as well if you find some time. The branch will get deleted as soon as the issue gets solved.

Thanks for reporting the issue by the way ;)

@antoniomadrigal10
Copy link

Also confirmed on Samsung Galaxy S3

@Bradeskojest
Copy link

I downloaded test App now, and it still freezes every 2s. Also when I set the speed to 0 (to get rid of the freezing), it crashes. I've sent a report.

@bzzup
Copy link

bzzup commented Feb 11, 2015

Any news about this issue? Lib is awesome, but i also have problems with Samsung devices (galaxy s4 mini, galaxy note 2)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants