Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

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;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mutliple #layouts #recyclerview
ADD COMMENT
Topic
Name
7+1 =