Answers for "how to make recyclerview in android"

7

androidx recyclerview dependency

dependencies {
    implementation "androidx.recyclerview:recyclerview:1.1.0"
    // For control over item selection of both touch and mouse driven selection
    implementation "androidx.recyclerview:recyclerview-selection:1.1.0-rc01"
}
Posted by: Guest on May-21-2020
1

how to use mutliple layouts in recyclerview

@Override
public int getItemViewType(int position) {
        if(user_id_array.get(position).equals(user_one))
            return 1;
        else if(user_id_array.get(position).equals(user_two))
            return 2;
        else
            return 3;
}
Posted by: Guest on December-14-2020

Code answers related to "how to make recyclerview in android"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language