The adapter is not connected; skipping layout error

I am developing an Android application that should display all the images stored on an SD card. I did this successfully, except that I get strange behavior when switching to landscape mode (in fact, I see nothing in my grid).

In logcat, I get this message: RecyclerView: the adapter is not connected; skipping layout

Yes, I use RecyclerView, and this only happens in the landscape, when I return to the portrait again, the Fragment is saved, and again I see every raster map inside my grid.

Now, does anyone know why this is happening to me? This is how I installed my adapter for recyclerView (inside the fragment):

@Override public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) { if (cursor.moveToFirst()) { adapter = new ImageAdapter(getActivity(), cursor, imageManager); imagesGrid.setAdapter(adapter); } } 

Oh, and by the way, I use the default GridLayoutManager for RecyclerView.

+7
android adapter android-fragments android-recyclerview
source share

No one has answered this question yet.

See similar questions:

190
recyclerview Adapter not connected; skipping layout
0
Some data not installed by the Recycler adapter

or similar:

1858
"Debug certificate expired" error in Android Eclipse plugins
1002
Grid motion detection
190
recyclerview Adapter not connected; skipping layout
nine
Android Distorted User Interface
6
Android Recyclerview delay while scrolling down
one
Rotating receiver View up to 90 degrees in this position.
one
The Recycler view instance is saved on the rotation screen.
one
RecyclerView in FragmentPagerAdaper is updated only when the screen is rotated
one
Do not save and restore RecyclerView position
0
LogCat error: no adapter. Skipping layout. onPostExecute

All Articles