Answers for "how to use mutliple layouts in recyclerview"

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 use mutliple layouts in recyclerview"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language