I used this code for populating the messages in the given screenshot and its working perfect populate messages.
Now the question is that how to populate an inbox like