how to attach adapter to recyclerview in android code example
Example 1: RecyclerView: No layout manager attached; skipping layout
You need to set layout manager
Kotlin:
val linearLayoutManager:LinearLayoutManager = LinearLayoutManager(this)
linearLayoutManager.orientation = LinearLayoutManager.HORIZONTAL{or VERTICAL}
recycleView.layoutManager = linearLayoutManager
Java:
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL{or VERTICAL});
list.setLayoutManager(linearLayoutManager);
Example 2: how to add recyclerview support in android studio
dependencies {
implementation 'com.android.support:recyclerview-v7:28.0.0'
}
Example 3: android jaca how to pass a imageurl in a recyclerview adapter
Glide.with(holder.thumbnail.getContext()).load(response.get(position).getThumbnail()).into(holder.thumbnail);
Example 4: E/RecyclerView: No adapter attached; skipping layout
E/RecyclerView: No adapter attached; skipping layout