Question

I am trying to develop an application that allows users to chat with each other via SMS.

I have done this job. But the main problem is that now I am giving much importance to the design of my layout. I want to make my inbox conversation just like the Android built-in message inbox conversation type. I am in a fix how to do it. I have googled it, but can't find something helpful. Anyone can help me with source code would be appreciated.

Was it helpful?

Solution

This Blog discuss how to make a ListView with speech bubble same as native android message app or some other apps out there. I thing you can find some helpful resources there also source code is available.

OTHER TIPS

I think you can create it with a dynamic layout. first you create a container that will be placed in a scrollview after that you have to load the data (how many is the message,content of the message). After you get the data you have to create a child view to be added in the container, you can design the child as you like and add it to the container.

overall it'll be looks like this

scrollview->container->(foreach child) add child;

and the pseudocode

Scrollview svList = (ScrollView) findviewbyid(R.id.svList);
LinearLayout llContainer = (LinearLayout) findviewbyid(R.id.llContainer);
new AsyncGetMessage().execute //use asynctask to get message
for(int i=0;i<numberofchild;i++)
{
    llContainer.addView(new Child(message,who)) 
    //who is a bool value to determine your message or your friend message
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top