Created
July 22, 2021 12:42
-
-
Save swahaniroy/3e7f1f8a7902e9e6d1bd5ad80ac1bba1 to your computer and use it in GitHub Desktop.
Routing an user from User Selection Screen to Chat Screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CometChatUserList.setItemClickListener(new OnItemClickListener<User>() { | |
| @Override | |
| public void OnItemClick(User user, int position) { | |
| Intent intent = new Intent(SelectContactActivity.this, CometChatMessageListActivity.class); | |
| intent.putExtra(UIKitConstants.IntentStrings.UID, user.getUid()); | |
| intent.putExtra(UIKitConstants.IntentStrings.AVATAR, user.getAvatar()); | |
| intent.putExtra(UIKitConstants.IntentStrings.STATUS, user.getStatus()); | |
| intent.putExtra(UIKitConstants.IntentStrings.NAME, user.getName()); | |
| intent.putExtra(UIKitConstants.IntentStrings.LINK,user.getLink()); | |
| intent.putExtra(UIKitConstants.IntentStrings.TYPE, CometChatConstants.RECEIVER_TYPE_USER); | |
| startActivity(intent); | |
| } | |
| @Override | |
| public void OnItemLongClick(User var, int position) { | |
| super.OnItemLongClick(var, position); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment