group recyclerview list by date in android studio

Solutions on MaxInterview for group recyclerview list by date in android studio by the best coders in the world

showing results for - "group recyclerview list by date in android studio"
Tommaso
16 Nov 2018
1public class ChatLeftViewHolder extends RecyclerView.ViewHolder {
2        private final String TAG = ChatRightViewHolder.class.getSimpleName();
3
4        public ChatLeftViewHolder(View itemView) {
5            super(itemView);
6            //TODO initialize your xml views
7        }
8
9        public void bind(final ChatModel chatModel) {
10            //TODO set data to xml view via textivew.setText();
11        }
12    }
13
Anton
03 Sep 2018
1public abstract class ListObject {
2        public static final int TYPE_DATE = 0;
3        public static final int TYPE_GENERAL_RIGHT = 1;
4        public static final int TYPE_GENERAL_LEFT = 2;
5
6        abstract public int getType(int userId);
7    }
8
Apple
01 Jan 2019
1public class DateObject extends ListObject {
2        private String date;
3
4        public String getDate() {
5            return date;
6        }
7
8        public void setDate(String date) {
9            this.date = date;
10        }
11
12        @Override
13        public int getType(int userId) {
14            return TYPE_DATE;
15        }
16    }
17