Staggered RecyclerView

CodingWithMitch · 33K views · 2018 · 26:09

Open on YouTube

Software (other)Web developmenttutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when someone needs a working example of a staggered grid RecyclerView or a single adapter that replaces several scrolling lists.

Recommended by 2 people across 2 different months, 2019 to 2020.

What it is

A 26-minute Android tutorial by Mitch Tabian (CodingWithMitch) showing how to build a staggered RecyclerView that displays images and text. It writes a RecyclerView adapter from scratch and loads images from the web with the Glide library, with source code on GitHub.

What people said

Recommends roei.meiri9 · 2019-04 · Stack Overflow · on “How to fix "Call to getEmbeddedPicture failed" exception?”

I fixed it! What was wrong was the path. Lol. I completely changed the code. I need it to be on CardView, so on the RecycleViewAdapter.java file I wrote the following code: Uri sArtworkUri = Uri.parse("content://media/external/audio/albumart"); /*getAlbumId gives you the ID of the album *(provided by - long albumId = songCursor.getLong(songCursor.getColumnIndex(MediaStore.Audio.Media.ALBUM_ID)); */ Uri imgUri = ContentUris.withAppendedId(sArtworkUri, albumList.get(position).getAlbumId()); Glide.with(mContext) .load(imgUri) .apply(requestOptions) .into(holder.img_album_cover); on onBindViewHolder() void. mContext is - Context mContext object //provided from RecyclerViewAdapter object) request

Recommends Waqleh · 2020-02 · Stack Overflow · on “Sync scrolling of multiple RecyclerViews”

Why are you creating multiple RecyclerViews? Why not just use one `StaggeredRecyclerViewAdapter` with `StaggeredGridLayoutManager`, it allows you to set the number of columns you need. Here is a good example: [this video] [LINK]

Recommends Waqleh · 2020-02 · Stack Overflow · on “I want to scroll multiple recyclerview at a time how to achieve that”

Why are you creating 3 RecyclerViews? Why not just use one `StaggeredRecyclerViewAdapter` with `StaggeredGridLayoutManager`, it allows you to set the number of columns you need. Here is a good example: [this video] [LINK]

Cites Tamir Abutbul · 2019-08 · Stack Overflow · on “Different heights in an Android GridLayout”

how to dynamically change heights of the note cards based on their text length - you can just set the layout height to wrap_content like this: android:layout_height="wrap_content" You can put your items in scrollView like this: <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android=" [LINK] " xmlns:app=" [LINK] " xmlns:tools=" [LINK] " android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:layout_width="50dp" android:layout_height="wrap_content" android:text="short text !!!!!!!!!!!!?!@#!@%$%$#" android:layout_marginBottom="8dp"/