Search in sources :

Example 1 with CometChatUsersAdapter

use of com.cometchat.pro.uikit.ui_components.shared.cometchatUsers.CometChatUsersAdapter in project android-java-chat-push-notification-app by cometchat-pro.

the class CometChatAddMembers method setAdapter.

private void setAdapter(List<User> users) {
    if (userListAdapter == null) {
        userListAdapter = new CometChatUsersAdapter(getContext(), Utils.userSort(users));
        StickyHeaderDecoration stickyHeaderDecoration = new StickyHeaderDecoration(userListAdapter);
        rvUserList.addItemDecoration(stickyHeaderDecoration, 0);
        rvUserList.setAdapter(userListAdapter);
    } else {
        userListAdapter.updateList(Utils.userSort(users));
    }
}
Also used : CometChatUsersAdapter(com.cometchat.pro.uikit.ui_components.shared.cometchatUsers.CometChatUsersAdapter) StickyHeaderDecoration(com.cometchat.pro.uikit.ui_resources.utils.sticker_header.StickyHeaderDecoration)

Aggregations

CometChatUsersAdapter (com.cometchat.pro.uikit.ui_components.shared.cometchatUsers.CometChatUsersAdapter)1 StickyHeaderDecoration (com.cometchat.pro.uikit.ui_resources.utils.sticker_header.StickyHeaderDecoration)1