A layout manager for the RecyclerView with interchangeable linear, grid, and staggered displays of views, all with configurable section headers including the sticky variety as specified in the material design docs.

Overview

SuperSLiM

This is the version 5 development branch.

Project Plan
Support me on Patreon
Blog

What is Version 5

Version 5 is the current development branch for SuperSLiM. Once Milestone 3 is reached it will become the main branch for the library. Currently available from this branch are the following things:

  • an adapter implementation backed by a DAG
  • a layout manager that can layout a hierarchy of nested sections
  • a linear section layout
  • predictive animations for item changes
  • support for layout configurations; layout direction (LTR, RTL), reverse layout, stack from end, and horizontal and vertical layout configurations.
  • an example app
  • way too much work for what you see

What does it not yet have? Lots. See the project plan for more details, and support me on patreon.

Comments
  • Scrolling issues

    Scrolling issues

    Hi,

    I think I found another issue:

    I have a grid layout with variable size cards. If the first card in the last line is bigger than the rest it is cut off. Also I can't scroll back to the top in this case.

    The layout item is completely displayed if I first scroll down and then turn the display (probably repainting the view)

    Edit: I am using the width-based version of the grid layout. Edit 2: If I scroll fast enough I will get the complete item visible

    bug confirmed 
    opened by GoodSir42 58
  • Crashing at the end of list

    Crashing at the end of list

    hi and thanks for your good library. I have a long recycle view that contain header simple text view and footers of it. however at the first it has no problem and works. but when i become to near the end of list it crashes with below message: 09-29 22:34:35.783 6065-6065/com.neganet.tst_superslim E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.neganet.tst_superslim, PID: 6065 java.lang.IllegalArgumentException: Scrapped or attached views may not be recycled. isScrap:false isAttached:true at android.support.v7.widget.RecyclerView$Recycler.recycleViewHolderInternal(RecyclerView.java:4243) at android.support.v7.widget.RecyclerView$Recycler.recycleView(RecyclerView.java:4193) at com.tonicartos.superslim.LayoutState.recycleCache(LayoutState.java:56) at com.tonicartos.superslim.LayoutManager.scrollVerticallyBy(LayoutManager.java:379) at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:3458) at android.view.Choreographer$CallbackRecord.run(Choreographer.java) at android.view.Choreographer.doCallbacks(Choreographer.java) at android.view.Choreographer.doFrame(Choreographer.java) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java) at android.os.Handler.handleCallback(Handler.java) at android.os.Handler.dispatchMessage(Handler.java) at android.os.Looper.loop(Looper.java) at android.app.ActivityThread.main(ActivityThread.java) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java) and at some shorter lists, at the end of list it stops and when try to scroll to up of the list it crashes with below message: 09-29 22:51:52.861 20513-20513/? E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.neganet.tst_superslim, PID: 20513 java.lang.StackOverflowError: stack size 8MB at android.support.v7.widget.ChildHelper.getOffset(ChildHelper.java:93) at android.support.v7.widget.ChildHelper.getChildAt(ChildHelper.java:156) at android.support.v7.widget.RecyclerView$LayoutManager.getChildAt(RecyclerView.java:6023) at com.tonicartos.superslim.LayoutManager.getAnchorAtStart(LayoutManager.java:1057) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:772) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.superslim.LayoutManager.fillNextSectionToStart(LayoutManager.java:825) at com.tonicartos.s 09-29 22:51:52.868 20513-20533/? I/art﹕ Background sticky concurrent mark sweep GC freed 40034(4MB) AllocSpace objects, 0(0B) LOS objects, 0% free, 73MB/73MB, paused 36.328ms total 66.022ms 09-29 22:51:53.353 20513-20528/? W/art﹕ Suspending all threads took: 12.977ms 09-29 22:51:53.360 20513-20513/? E/JavaBinder﹕ !!! FAILED BINDER TRANSACTION !!! 09-29 22:51:53.361 20513-20513/? E/AndroidRuntime﹕ Error reporting crash android.os.TransactionTooLargeException at android.os.BinderProxy.transactNative(Native Method) at android.os.BinderProxy.transact(Binder.java) at android.app.ActivityManagerProxy.handleApplicationCrash(ActivityManagerNative.java) at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java) at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693) at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690) 09-29 22:51:53.361 20513-20513/? I/Process﹕ Sending signal. PID: 20513 SIG: 9 what is the reason of that issue? how can i Fix it

    invalid 
    opened by u2u4u 23
  • IllegalArgumentException: Scrapped or attached views may not be recycled. isScrap:false isAttached:true

    IllegalArgumentException: Scrapped or attached views may not be recycled. isScrap:false isAttached:true

    at android.support.v7.widget.RecyclerView$Recycler.recycleViewHolderInternal(RecyclerView.java:4243) at android.support.v7.widget.RecyclerView$Recycler.recycleView(RecyclerView.java:4193) at com.tonicartos.superslim.LayoutState.recycleCache(LayoutState.java:52) at com.tonicartos.superslim.LayoutManager.scrollVerticallyBy(LayoutManager.java:367) at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:3458) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:777) at android.view.Choreographer.doCallbacks(Choreographer.java:590) at android.view.Choreographer.doFrame(Choreographer.java:559) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5834) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)

    invalid 
    opened by muresanb 14
  • Headers are displayed underneath the regular cards

    Headers are displayed underneath the regular cards

    Hi again!

    I found another issue: Sticky headers are somehow displayed below my cards. this may have something to do with the elevation level of a card on Android 5, but I am really not sure.. Could you have a look at it and make sure that headers are always on top? (telling me what may be wrong is also an option ;) ) screenshot_2015-03-03-09-26-23

    enhancement invalid confirmed 
    opened by GoodSir42 14
  • findFirstCompletelyVisibleItemPosition and findLastCompletelyVisibleItemPosition don't find anything.

    findFirstCompletelyVisibleItemPosition and findLastCompletelyVisibleItemPosition don't find anything.

    The following stack trace occurs if I try to use the layoutManagers.findFirstCompletelyVisibleItemPosition to obtain the position of the first item on the screen.

    java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()' on a null object reference at android.support.v7.widget.RecyclerView$LayoutManager.getPosition(RecyclerView.java:5017) at com.tonicartos.superslim.LayoutManager.findFirstCompletelyVisibleItemPosition(LayoutManager.java:139)

    I do not get a NPE if I switch the call to layoutManager.findFirstVisibleItemPosition().

    I can use the later as a work around to obtain the position, but the former is preferable.

    This is with version 4.12 of SuperSLiM.

    bug blocking 
    opened by kingargyle 13
  • Null Pointer Exception on LayoutManager.getAnchorAtEnd

    Null Pointer Exception on LayoutManager.getAnchorAtEnd

    Stack Trace


    0 java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()' on a null object reference 1 at com.tonicartos.superslim.LayoutManager.getAnchorAtEnd(SourceFile:1038) 2 at com.tonicartos.superslim.LayoutManager.fillNextSectionToEnd(SourceFile:725) 3 at com.tonicartos.superslim.LayoutManager.layoutChildren(SourceFile:3369) 4 onLayoutChildren 5 at android.support.v7.widget.RecyclerView.dispatchLayout(SourceFile:2847) 6 at android.support.v7.widget.RecyclerView.resumeRequestLayout(SourceFile:1599) 7 at android.support.v7.widget.RecyclerView$1.run(SourceFile:277) 8 at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) 9 at android.view.Choreographer.doCallbacks(Choreographer.java:580) 10 at android.view.Choreographer.doFrame(Choreographer.java:549) 11 at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) 12 at android.os.Handler.handleCallback(Handler.java:739) 13 at android.os.Handler.dispatchMessage(Handler.java:95) 14 at android.os.Looper.loop(Looper.java:135) 15 at android.app.ActivityThread.main(ActivityThread.java:5292) 16 at java.lang.reflect.Method.invoke(Native Method) 17 at java.lang.reflect.Method.invoke(Method.java:372) 18 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) 19 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)

    Threads


    Thread: pool-3-thread-1 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016) 5 at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at java.lang.Thread.run(Thread.java:818)

    Thread: Chrome_IOThread

    Thread: fifo-pool-thread-0 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016) 5 at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at java.lang.Thread.run(Thread.java:818) 10 at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(SourceFile:118)

    Thread: Chrome_FileUserBlockingThread

    Thread: hwuiTask1

    Thread: RenderThread

    Thread: Signal Catcher

    Thread: AsyncTask #2 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016) 5 at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at java.lang.Thread.run(Thread.java:818)

    Thread: Thread-9928

    Thread: Thread-9929

    Thread: Binder_2

    Thread: HeapTrimmerDaemon 0 at dalvik.system.VMRuntime.trimHeap(Native Method) 1 at java.lang.Daemons$HeapTrimmerDaemon.run(Daemons.java:313) 2 at java.lang.Thread.run(Thread.java:818)

    Thread: FinalizerDaemon 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Object.wait(Object.java:422) 2 at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:101) 3 at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:72) 4 at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:174) 5 at java.lang.Thread.run(Thread.java:818)

    Thread: OPTMZ 0 at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) 1 at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:318) 2 at com.android.okhttp.Connection.upgradeToTls(Connection.java:201) 3 at com.android.okhttp.Connection.connect(Connection.java:155) 4 at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276) 5 at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211) 6 at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:382) 7 at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106) 8 at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:217) 9 at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218) 10 at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:25) 11 at crittercism.android.h.a(Unknown Source) 12 a 13 a 14 at crittercism.android.h.run(Unknown Source) 15 at crittercism.android.cy.a(Unknown Source) 16 at crittercism.android.dc.run(Unknown Source) 17 at java.lang.Thread.run(Thread.java:818)

    Thread: Thread-9925

    Thread: fifo-pool-thread-1 0 at com.android.org.conscrypt.NativeCrypto.SSL_read(Native Method) 1 at com.android.org.conscrypt.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:699) 2 at crittercism.android.n.read(Unknown Source) 3 read 4 read 5 at com.android.okio.Okio$2.read(Okio.java:113) 6 at com.android.okio.RealBufferedSource.read(RealBufferedSource.java:48) 7 at com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.read(HttpConnection.java:446) 8 at com.android.okio.RealBufferedSource$1.read(RealBufferedSource.java:168) 9 at java.io.FilterInputStream.read(FilterInputStream.java:118) 10 at com.bumptech.glide.util.ContentLengthInputStream.read(SourceFile:65) 11 at com.bumptech.glide.util.ContentLengthInputStream.read(SourceFile:60) 12 at com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream.fillbuf(SourceFile:132) 13 at com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream.read(SourceFile:309) 14 at java.io.InputStream.read(InputStream.java:162) 15 at com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream.fillbuf(SourceFile:132) 16 at com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream.read(SourceFile:309) 17 at com.bumptech.glide.util.ExceptionCatchingInputStream.read(SourceFile:84) 18 at java.io.FilterInputStream.read(FilterInputStream.java:118) 19 at com.bumptech.glide.util.MarkEnforcingInputStream.read(SourceFile:44) 20 at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) 21 at android.graphics.BitmapFactory.decodeStreamInternal(BitmapFactory.java:635) 22 at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:611) 23 at com.bumptech.glide.load.resource.bitmap.Downsampler.getSampleSize(SourceFile:329) 24 decodeStream 25 at com.bumptech.glide.load.resource.bitmap.Downsampler.downsampleWithSize(SourceFile:2220) 26 decode 27 getSampleSize 28 at com.bumptech.glide.load.resource.bitmap.StreamBitmapDecoder.decode(SourceFile:1050) 29 decode 30 at com.bumptech.glide.load.resource.bitmap.ImageVideoBitmapDecoder.decode(SourceFile:39) 31 at com.bumptech.glide.load.resource.bitmap.ImageVideoBitmapDecoder.decode(SourceFile:20) 32 at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeBitmapWrapper(SourceFile:121) 33 at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeStream(SourceFile:1094) 34 decode 35 decode 36 at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(SourceFile:22) 37 at com.bumptech.glide.load.engine.DecodeJob.decodeFromSourceData(SourceFile:2190) 38 decodeSource 39 at com.bumptech.glide.load.engine.DecodeJob.decodeFromSource(SourceFile:128) 40 at com.bumptech.glide.load.engine.EngineRunnable.decodeFromSource(SourceFile:1122) 41 decode 42 run 43 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) 44 at java.util.concurrent.FutureTask.run(FutureTask.java:237) 45 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 46 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 47 at java.lang.Thread.run(Thread.java:818) 48 at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(SourceFile:118)

    Thread: Binder_1

    Thread: OkHttp ConnectionPool 0 at java.lang.Object.wait(Native Method) 1 at com.squareup.okhttp.ConnectionPool.performCleanup(SourceFile:304) 2 at com.squareup.okhttp.ConnectionPool.runCleanupUntilPoolIsEmpty(SourceFile:241) 3 at com.squareup.okhttp.ConnectionPool.access$000(SourceFile:54) 4 at com.squareup.okhttp.ConnectionPool$1.run(SourceFile:97) 5 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 6 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 7 at java.lang.Thread.run(Thread.java:818)

    Thread: Thread-9930

    Thread: ReferenceQueueDaemon 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:134) 2 at java.lang.Thread.run(Thread.java:818)

    Thread: GCDaemon 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Daemons$GCDaemon.run(Daemons.java:344) 2 at java.lang.Thread.run(Thread.java:818)

    Thread: Thread-9891 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:197) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2055) 5 at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1060) 6 at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:776) 7 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 8 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 9 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 10 at crittercism.android.cy.a(Unknown Source) 11 at crittercism.android.dc.run(Unknown Source) 12 at java.lang.Thread.run(Thread.java:818)

    Thread: Chrome_FileThread

    Thread: AsyncTask #3 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016) 5 at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at java.lang.Thread.run(Thread.java:818)

    Thread: AsyncTask #4 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016) 5 at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at java.lang.Thread.run(Thread.java:818)

    Thread: fifo-pool-thread-3 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016) 5 at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at java.lang.Thread.run(Thread.java:818) 10 at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(SourceFile:118)

    Thread: Chrome_CacheThread

    Thread: OkHttp ConnectionPool 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:197) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2055) 5 at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:435) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at java.lang.Thread.run(Thread.java:818)

    Thread: Okio Watchdog 0 at java.lang.Object.wait(Native Method) 1 at okio.AsyncTimeout.awaitTimeout(SourceFile:297) 2 at okio.AsyncTimeout.access$000(SourceFile:40) 3 at okio.AsyncTimeout$Watchdog.run(SourceFile:272)

    Thread: fifo-pool-thread-2 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016) 5 at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at java.lang.Thread.run(Thread.java:818) 10 at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(SourceFile:118)

    Thread: pool-2-thread-1 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016) 5 at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at java.lang.Thread.run(Thread.java:818)

    Thread: FinalizerWatchdogDaemon 0 at java.lang.Thread.sleep(Native Method) 1 at java.lang.Thread.sleep(Thread.java:1031) 2 at java.lang.Thread.sleep(Thread.java:985) 3 at java.lang.Daemons$FinalizerWatchdogDaemon.sleepFor(Daemons.java:258) 4 at java.lang.Daemons$FinalizerWatchdogDaemon.waitForFinalization(Daemons.java:269) 5 at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:217) 6 at java.lang.Thread.run(Thread.java:818)

    Thread: AsyncTask #5 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016) 5 at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at java.lang.Thread.run(Thread.java:818)

    Thread: Chrome_ProcessLauncherThread

    Thread: fifo-pool-thread-0 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016) 5 at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at java.lang.Thread.run(Thread.java:818) 10 at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(SourceFile:118)

    Thread: Thread-9897 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016) 5 at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at crittercism.android.cy.a(Unknown Source) 10 at crittercism.android.dc.run(Unknown Source) 11 at java.lang.Thread.run(Thread.java:818)

    Thread: pool-4-thread-1 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016) 5 at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at java.lang.Thread.run(Thread.java:818)

    Thread: cr.CleanupReference 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Object.wait(Object.java:422) 2 at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:101) 3 at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:72) 4 at org.chromium.content.common.CleanupReference$1.run(CleanupReference.java:51)

    Thread: hwuiTask2

    Thread: Binder_3

    Thread: AsyncTask #1 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016) 5 at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at java.lang.Thread.run(Thread.java:818)

    Thread: Chrome_DBThread

    Thread: pool-5-thread-1 0 at java.lang.Object.wait(Native Method) 1 at java.lang.Thread.parkFor(Thread.java:1220) 2 at sun.misc.Unsafe.park(Unsafe.java:299) 3 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) 4 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016) 5 at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410) 6 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) 7 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) 8 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 9 at java.lang.Thread.run(Thread.java:818)

    Thread: Thread-9924

    Thread: Thread-9926

    Thread: TXN Thread 0 at java.lang.Object.wait(Native Method) 1 at android.os.ConditionVariable.block(ConditionVariable.java:97) 2 at crittercism.android.ba.a(Unknown Source) 3 a 4 at crittercism.android.dc.run(Unknown Source) 5 at crittercism.android.cy.a(Unknown Source) 6 at crittercism.android.dc.run(Unknown Source) 7 at java.lang.Thread.run(Thread.java:818)

    invalid 
    opened by jlmalone 12
  • Gridlayout ignores margins

    Gridlayout ignores margins

    Hi!

    first of all: a nice library. A bit hard to setup, but the result is amazing!

    I have a little issue: The GridSectionLayoutManager ignores the margin on my layouts.

    I have some CardViews that use a layout_margin of 8dp in the topmost view. The default layoutmanagers in the RecyclerView support library recognize this margin and render the views accordingly. However your manager requires another view wrapped around it to make the margin visible.

    bug 
    opened by GoodSir42 12
  • Better handling of end-of-list removal

    Better handling of end-of-list removal

    If notifyDataSetChanged() is called when the user has scrolled to the end of a long list, and several rows at the end of the list have been removed, the new list is laid-out improperly. You get a list that is scrolled past the end, presenting just white space. You can drag-down on the white space area and the tail-end of the list scrolls back into view.

    The Android LinearLayoutManager handles this case by scrolling the list back to the first position, which isn't ideal, but it is better than scrolled past the (new) end.

    confirmed 
    opened by RayDar 11
  • Index out of bounds exception sometimes when updating the recylcer view

    Index out of bounds exception sometimes when updating the recylcer view

    I am getting index out of bounds exception when I sometimes update the recycler view. All I am doing is

    1. Replacing the dataset in the recycler adapter
    2. Calling notifyDataSetChanged();

    My getItemCount returns just returns the count of the dataset.

    I am not sure if there is a bug in my code or not. I only started noticing this issue after around 0.4.4 (or some other release near that). Here is the crash log. I am using the latest version 0.4.7.

    java.lang.IndexOutOfBoundsException: Invalid item position 12(12). Item count:12 at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:3614) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:3609) at com.tonicartos.superslim.LayoutState.getView(LayoutState.java:44) at com.tonicartos.superslim.LayoutManager.layoutChildren(LayoutManager.java:1306) at com.tonicartos.superslim.LayoutManager.onLayoutChildren(LayoutManager.java:262) at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2118) at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:2415) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:561) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1076) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1594) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557) at android.widget.LinearLayout.onLayout(LinearLayout.java:1466) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:907) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1076) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1076) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557) at android.widget.LinearLayout.onLayout(LinearLayout.java:1466) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:15671) at android.view.ViewGroup.layout(ViewGroup.java:5038) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2086) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1843) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1061) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5885) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) at android.view.Choreographer.doCallbacks(Choreographer.java:580) at android.view.Choreographer.doFrame(Choreographer.java:550) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Method.java) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

    bug 
    opened by ashmosaheb 11
  • Sporadic NullPointerException in 0.4.5 on devices running KitKat

    Sporadic NullPointerException in 0.4.5 on devices running KitKat

    Using the the 0.4.5 release. This is happening for some of our users, but unfortunately we are unable to reproduce it, so it's hard to say why it's happening. All reports are coming from devices running KitKat (4.4.2 and 4.4.4) and this apparently happens upon loading the activity (or shortly thereafter?).

    This stack trace closely resembles https://github.com/TonicArtos/SuperSLiM/issues/4, but we're obviously using a more recent version.

    I will update this issue as soon as I can find more useful information (sorry it's so vague!), but I thought I'd report it in the meantime in case anyone has ideas.

    java.lang.NullPointerException at android.support.v7.widget.RecyclerView$LayoutManager.getPosition(SourceFile:5017) at com.tonicartos.superslim.LayoutManager.computeVerticalScrollOffset(SourceFile:555) at android.support.v7.widget.RecyclerView.computeVerticalScrollOffset(SourceFile:1115) at android.view.View.canScrollVertically(View.java:12016) at android.support.v4.view.ViewCompatICS.canScrollVertically(SourceFile:34) at android.support.v4.view.ViewCompat$ICSViewCompatImpl.canScrollVertically(SourceFile:907) at android.support.v4.view.ViewCompat.canScrollVertically(SourceFile:1192) at android.support.v7.widget.RecyclerView$LayoutManager.onInitializeAccessibilityEvent(SourceFile:6301) at android.support.v7.widget.RecyclerViewAccessibilityDelegate.onInitializeAccessibilityEvent(SourceFile:66) at android.support.v4.view.AccessibilityDelegateCompat$AccessibilityDelegateJellyBeanImpl$1.onInitializeAccessibilityEvent(SourceFile:228) at android.support.v4.view.AccessibilityDelegateCompatJellyBean$1.onInitializeAccessibilityEvent(SourceFile:56) at android.view.View.onInitializeAccessibilityEvent(View.java:5204) at android.view.View.sendAccessibilityEventUncheckedInternal(View.java:5077) at android.view.View$AccessibilityDelegate.sendAccessibilityEventUnchecked(View.java:19417) at android.support.v4.view.AccessibilityDelegateCompatIcs.sendAccessibilityEventUnchecked(SourceFile:117) at android.support.v4.view.AccessibilityDelegateCompat$AccessibilityDelegateIcsImpl.sendAccessibilityEventUnchecked(SourceFile:210) at android.support.v4.view.AccessibilityDelegateCompat.sendAccessibilityEventUnchecked(SourceFile:358) at android.support.v4.view.AccessibilityDelegateCompat$AccessibilityDelegateJellyBeanImpl$1.sendAccessibilityEventUnchecked(SourceFile:255) at android.support.v4.view.AccessibilityDelegateCompatJellyBean$1.sendAccessibilityEventUnchecked(SourceFile:82) at android.view.View.sendAccessibilityEventUnchecked(View.java:5062) at android.view.ViewRootImpl$SendWindowContentChangedAccessibilityEvent.run(ViewRootImpl.java:6615) at android.view.ViewRootImpl$SendWindowContentChangedAccessibilityEvent.runOrPost(ViewRootImpl.java:6641) at android.view.ViewRootImpl.postSendWindowContentChangedCallback(ViewRootImpl.java:5876) at android.view.ViewRootImpl.notifySubtreeAccessibilityStateChanged(ViewRootImpl.java:5949) at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2539) at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2539) at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2539) at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2539) at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2539) at android.view.View.notifySubtreeAccessibilityStateChangedIfNeeded(View.java:7434) at android.view.View.setFrame(View.java:15057) at android.view.View.layout(View.java:14944) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:14948) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.support.v4.view.ViewPager.onLayout(SourceFile:1594) at android.view.View.layout(View.java:14948) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:14948) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525) at android.widget.LinearLayout.onLayout(LinearLayout.java:1434) at android.view.View.layout(View.java:14948) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:14948) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1987) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1744) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5610) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761) at android.view.Choreographer.doCallbacks(Choreographer.java:574) at android.view.Choreographer.doFrame(Choreographer.java:544) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:212) at android.app.ActivityThread.main(ActivityThread.java:5137) at java.lang.reflect.Method.invokeNative(Method.java) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718) at dalvik.system.NativeStart.main(NativeStart.java)

    opened by kcorwin 11
  • Initialization thoughts.

    Initialization thoughts.

    I'd like to discuss the initialization process. Right now, the initialization code for SuperSLiM is a bit verbose:

    layoutManager = new LayoutManager();
    headerManager = new LinearSectionLayoutManager(layoutManager);
    layoutManager.registerSectionLayoutManager(0, headerManager);
    gridManager = new GridSectionLayoutManager(layoutManager, getActivity());
    gridManager.setNumColumns(3);
    layoutManager.registerSectionLayoutManager(1, gridManager);
    recyclerView.setLayoutManager(layoutManager);
    

    We currently have to initialize the all SLM's (including the default SLM's) ourselves, keep track of the index and correctly match these in our view binding/xml.

    I would love to be able to do something like:

    layoutManager = LayoutManager.enableLinearSLM().enableGridSLM(context, 3).addCustomSLM(new MySLM()).build()
    recyclerView.setLayoutManager(layoutManager);
    

    We could then use some sort of tag so then

    final LayoutManager.LayoutParams lp = (LayoutManager.LayoutParams) holder.itemView.getLayoutParams();
    lp.sectionManager = 0
    

    would become something like

    lp.setSLM(LinearSLM.tag)
    

    I'm not sure how this would work via XML, but this shows exactly what SLM is being used without having to switch from your adapter to recyclerview implementation to match up ids.

    discussion 
    opened by PatrickDattilio 11
  • Scrolling issue with Sticky Headers on

    Scrolling issue with Sticky Headers on

    When you use this library with a RecyclerView that sits inside a swipe to refresh layout, or any other layout that handles vertical scrolling (i.e. a bottom sheet behavior), if you scroll up the list to the top and keep going, it will trigger the swipe to refresh or the bottom sheet dragging BEFORE the RecyclerView reaches the top of the list, so before it gets to the first header.

    This issue seems to go away if I don't use the library, in both scenarios.

    opened by dvdciri 0
  • Is this covered by the Apache 2.0 License?

    Is this covered by the Apache 2.0 License?

    Hi,

    I cannot find a license for this project here on GitHub. I would like to ask if there is one. There seems to be a project page here: https://tonicartos.nz/SuperSLiM/ in which you say that this is covered by the Apache 2.0 License. Is that correct. If so, would you mind adding the license file to the GitHub repo too? Thank you in advance.

    Kind regards, Rafael

    opened by mpatsis 0
  • NPE at LayoutManager#onItemsUpdated

    NPE at LayoutManager#onItemsUpdated

    This is NPE crash log

    --------- beginning of crash 06-25 19:54:19.959 4842 4842 E AndroidRuntime: FATAL EXCEPTION: main 06-25 19:54:19.959 4842 4842 E AndroidRuntime: Process: jp.naver.line.android, PID: 4842 06-25 19:54:19.959 4842 4842 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()' on a null object reference 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.support.v7.widget.RecyclerView$LayoutManager.getPosition(RecyclerView.java:8294) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at com.linecorp.linekeep.opensrc.com.tonicartos.superslim.LayoutManager.onItemsUpdated(LayoutManager.java:545) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.support.v7.widget.RecyclerView$LayoutManager.onItemsUpdated(RecyclerView.java:9728) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.support.v7.widget.RecyclerView$6.dispatchUpdate(RecyclerView.java:943) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.support.v7.widget.RecyclerView$6.onDispatchFirstPass(RecyclerView.java:931) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.support.v7.widget.AdapterHelper.dispatchFirstPassAndUpdateViewHolders(AdapterHelper.java:314) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.support.v7.widget.AdapterHelper.dispatchAndUpdateViewHolders(AdapterHelper.java:300) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.support.v7.widget.AdapterHelper.applyUpdate(AdapterHelper.java:220) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.support.v7.widget.AdapterHelper.preProcess(AdapterHelper.java:104) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.support.v7.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:1753) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.support.v7.widget.RecyclerView$1.run(RecyclerView.java:356) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:930) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:705) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:637) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:916) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:751) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6823) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1557) 06-25 19:54:19.959 4842 4842 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1445)

    It looks like getChildAt(0) sometimes return null. Do we need to handle NPE here?

        @Override
        public void onItemsUpdated(RecyclerView recyclerView, int positionStart, int itemCount) {
            super.onItemsUpdated(recyclerView, positionStart, itemCount);
    
            View first = getChildAt(0);
            View last = getChildAt(getChildCount() - 1);
            if (positionStart + itemCount <= getPosition(first)) {
                return;
            }
    
            if (positionStart <= getPosition(last)) {
                requestLayout();
            }
        }
    
    opened by jihunim 0
  • i cannot build the project

    i cannot build the project

    org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':library'.

    Caused by: java.lang.NoSuchMethodError: com.android.build.gradle.internal.variant.BaseVariantData.getOutputs()Ljava/util/List;

    opened by varunchandran333 0
Releases(m1)
  • m1(Dec 23, 2015)

    Version 5

    Version 5 replaces all previous version of SuperSLiM. It is a complete and robust rewrite of the library fixing fundamental flaws that made SuperSLiM unworkable in version 4 and earlier. As older versions of the library are not compatible and are inescapably broken, they will not be updated in any form.

    Version 5 introduces a new interface for both the adapter and section layout managers (SLMs). You do not have to use the provided adapter, if you wish to, you can implement your own adapter, the only requirement is to implement the AdapterContract interface. The interface for SLMs is not yet finalised, however the general layers of abstraction are. The intent is to make implementing SLMs as simple as possible, hiding as much complexity in the library as much as possible.

    About this milestone

    Milestone 1 is not yet a usable form of the new library, however, you can try out the new API and determine whether the new direction of the library is right for you. Currently implemented are the internal graph, an adapter, a nested linear layout without scrolling, and predictive animations.

    Future development

    The next milestone, Milestone 2, will be a usable library with support for nested linear sections, scrolling, and various header configurations. Milestone 3 and later will extend the utility of the library with things such as grid layouts, section footers, watchable events, and also other things like examples and tutorials. A roadmap is available on Trello.

    Source code(tar.gz)
    Source code(zip)
    superslim.aar(172.91 KB)
  • v0.4.13(May 11, 2015)

    Added tests and fixes for layout, scrolling, and find methods. Deprecated set methods on GridSLM, these will be removed in 0.5.

    Due to pixel fitting on calculated columns, some grid columns and cells can be a slightly different width from others. In previous versions they were all the same, but could end out overlapping.

    • Fixed find first completely visible methods to actually find something (#88).
    • Fixed numerous minor layout bugs that resulted in views being attached just outside the viewable area.
    • Fixed a few layout bugs that resulted in some views overlapping by one pixel or being off by one pixel.
    Source code(tar.gz)
    Source code(zip)
  • v0.4.12(May 3, 2015)

    Two small fixes in this update. The grid slm should now honour the RTL layout direction. Also, when the recycler view is rotated or recreated, it should now restore to the correct adapter position.

    Changelog

    • Fix RTL layout in grid SLM (#16).
    • Fix position restoration (#85).
    Source code(tar.gz)
    Source code(zip)
  • v0.4.11(May 2, 2015)

    Changelog

    • Fix display error on scrolling over an empty section with a header (#83).
    • Work around for items without layout params (#74).
    • Update to support libs v22.1.1 (#76).
    Source code(tar.gz)
    Source code(zip)
  • v0.4.10.1(Apr 30, 2015)

  • v0.4.10(Apr 24, 2015)

    Changelog

    • Add static factory method to preserve margin layout parameters (#73) - @adi1133.
    • Fix overscroll after notifyDataSetChanged() is called (#70).
    Source code(tar.gz)
    Source code(zip)
  • v0.4.9.1(Apr 22, 2015)

  • v0.4.9(Apr 1, 2015)

  • v0.4.8(Mar 25, 2015)

  • v0.4.7(Mar 19, 2015)

  • v0.4.6(Mar 16, 2015)

  • v0.4.5(Mar 23, 2015)

  • v0.4.4(Mar 4, 2015)

  • v0.4.3(Mar 3, 2015)

    Changelog

    • Fix layout requested position (orientation change) when content doesn't fill the recycler view (#49).
    • Fix scroll jumping if content doesn't fill the recycler view (#47).
    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(Mar 2, 2015)

  • v0.4.0(Feb 27, 2015)

    Big changes in this version. Layout and scrolling have new cleaner implementations with better performance. SuperSLiM should also be a little nicer to use with more xml configuration available and a simpler declaration of section layouts.

    Changelog

    • Simpler initialisation (#41).
    • Configuration of SLMs through layout params and xml.
    • Support for layout params and xml attrs for custom SLMs.
    • Support margins (#43).
    • New layout implementation.
    • New scroll implementation.
    • Fix layout corruption on fling (#35).
    • Add scroll indicator (#14).
    • Change layoutId to sectionManager (#28).
    Source code(tar.gz)
    Source code(zip)
  • v0.2.4(Feb 19, 2015)

  • v0.2.3(Feb 19, 2015)

  • v0.2.2(Feb 18, 2015)

  • v0.2.1(Feb 17, 2015)

    Changelog

    • Add methods required for infinite scrolling (#22).
    • Fix extraneous creation of view holders by grid section layout manager (#15).
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Feb 16, 2015)

    This release has a breaking change with the move to a simpler API to register SectionLayoutManagers.

    New features

    • Support for RTL languages.

    Changelog

    12-02-2015

    • Clearer naming to better convey meaning of attributes and layout parameters and their values. Updated documentation.
    • Change from using a factory to instantiate SectionLayoutManagers to registering SLMs to ids.

    11-02-2015

    • Support for RTL layout direction.
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Feb 11, 2015)

Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager.

Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager.

Jack and phantom 504 Dec 25, 2022
ANDROID. ChipsLayoutManager (SpanLayoutManager, FlowLayoutManager). A custom layout manager for RecyclerView which mimicric TextView span behaviour, flow layouts behaviour with support of amazing recyclerView features

ChipsLayoutManager This is ChipsLayoutManager - custom Recycler View's LayoutManager which moves item to the next line when no space left on the curre

Oleg Beloy 3.2k Dec 25, 2022
Dogglers app uses a RecyclerView in horizontal, vertical and grid view to show a group of CardViews

Welcome to DogglersApp! This app is the final project from Unit 2 of Android Basics in Kotlin given by Google codelabs: https://developer.android.com/

David Ortega Farrerons 1 Feb 25, 2022
how to handle recyclerView in Kotlin to display grid , vertical , horizontal layouts

Dogglers - Starter Code Starter code for the second independent project for Android Basics in Kotlin. Introduction This is the starter code for the Do

null 0 Mar 28, 2022
An adapter to create Android RecyclerViews with sections, providing headers and footers.

⚠ This library is no longer maintained ⚠️ SectionedRecyclerView An adapter to create Android RecyclerViews with sections, providing headers and footer

Tomás Ruiz-López 809 Dec 21, 2022
A custom recycler view with shimmer views to indicate that views are loading.

ShimmerRecyclerView Intro A custom recycler view with shimmer views to indicate that views are loading. The recycler view has a built-in adapter to co

Harish Sridharan 3.8k Dec 31, 2022
Custom Layout Manager for Recycler View

Circular Layout Manager Overview A library for Android which essentially contains a Custom Layout Manager for Recycler View which lays out its child v

Kapilesh Iyer 181 Dec 2, 2022
A couple of sticky header decorations for android's recycler view.

DEPRECATION NOTICE This library has not been touched in a very long time and many things have changed in the android ecosystem since then. Updating an

Eduardo Barrenechea 879 Nov 26, 2022
A couple of sticky header decorations for android's recycler view.

DEPRECATION NOTICE This library has not been touched in a very long time and many things have changed in the android ecosystem since then. Updating an

Eduardo Barrenechea 879 Nov 26, 2022
Handy library to integrate pagination, which allow no data layout, refresh layout, recycler view in one view and easy way to bind pagination in app.

Pagination View Handy library to integrate pagination, which allow no data layout, refresh layout, recycler view in one view and easy way to bind pagi

DhiWise 4 Dec 18, 2021
A Common RecyclerView.Adapter implementation which supports all kind of items and has useful data operating APIs such as remove,add,etc.

##PowerfulRecyclerViewAdapter A Common RecyclerView.Adapter implementation which supports any kind of items and has useful data operating APIs such as

null 313 Nov 12, 2022
A RecyclerView that implements pullrefresh and loadingmore featrues.you can use it like a standard RecyclerView

XRecyclerView a RecyclerView that implements pullrefresh , loadingmore and header featrues.you can use it like a standard RecyclerView. you don't need

XRecyclerView 5.3k Dec 26, 2022
A RecyclerView that implements pullrefresh and loadingmore featrues.you can use it like a standard RecyclerView

XRecyclerView a RecyclerView that implements pullrefresh , loadingmore and header featrues.you can use it like a standard RecyclerView. you don't need

XRecyclerView 5.3k Dec 26, 2022
TikTok-RecyclerView - This is a demo app built using 'Koin' a new dependency injection framework for Android along with RecyclerView and ExoPlayer2.

TikTok-RecyclerView Demo About This is a demo app built using 'Koin' a new dependency injection framework for Android along with RecyclerView and ExoP

Baljeet Singh 19 Dec 28, 2022
Pagination-RecyclerView - Simple and easy way to Paginating a RecyclerView

Pagination-RecyclerView Simple and easy way to Paginating a RecyclerView Android

Rakshit Nawani 0 Jan 3, 2022
RecyclerView : SleepQualityTracker with RecyclerView app

RecyclerView - SleepQualityTracker with RecyclerView app SleepQualityTracker with RecyclerView This app builds on the SleepQualityTracker developed pr

Kevin 2 May 14, 2022
Elegant design and convenient to use RecyclerView adapter library based on Kotlin DSL.

xAdapter: Kotlin DSL 风格的 Adapter 封装 1、简介 该项目是 KotlinDSL 风格的 Adapter 框架封装,用来简化 Adapter 调用,思想是采用工厂和构建者方式获取 Adapter 避免代码中定义大量的 Adapter 类。该项目在 BRVAH 的 Ada

ShouHeng 17 Oct 9, 2022
A RecyclerView(advanced and flexible version of ListView in Android) with refreshing,loading more,animation and many other features.

UltimateRecyclerView Master branch: Dev branch: Project website:https://github.com/cymcsg/UltimateRecyclerView Description UltimateRecyclerView is a R

MarshalChen 7.2k Jan 2, 2023