Search code examples
androidfirebaseandroid-imageviewandroid-recyclerview

How to customzie my RecyclerView Adapter to show the ImageView directly for the sender?


I am working on an Android/Firebase chat app that send images. After a gallery intent, I get the Uri in onActivityResult and assign it to a public Uri in the activity. My question is that how can I customize the RecyclerView adapter to show the image directly for the sender only without the need to wait the image to be uploaded to Firebase then retrieving it?


Solution

  • Try in the sender bind in your adapter to set the image with Picasso and with if statement: if(theUri != null)