I want to create a Custom listview like this the below image. I am creating a chat app, in that app have to pass text, images and video etc. see below image.

In that, when a user send/receive image in chat, if he wants to see that by clicking on the button beside that image, how to move to another activity with that image path (or) url, for showing full image, and when user clickngi on image have to show a Quick view. same way if that is video, i have to get that path (or) url to play video properly.
How to differenciate the list item depends on the item type.
If you want to show different rows for audio, image and text messages, you need to have 3 row layouts, then you will decide which row needs to be returned from your
getView()of yourCustomAdapter. There are two methodsgetViewTypeCount()andgetItemViewType()of Adapter which will help your recycling the row to show up inListView.You will first tell that how many layouts in your
ListViewwill be usinggetViewTypeCount()which tells the adapter how many row types will be there, next check what kind of data is present at that position in your data model and you return the view type fromgetItemViewType(), sogetView()will receive the relevant recycled view (if there is any).Here is my blog post about using 9 patch images, it demonstrate sender and receiver type of views, same can be applied for image and audio based on the item in your data model at that specific position.