How do I create this type of chat layout in my application?

I am developing one chat application and I want to create a chat screen layout, for example, the next screen. Chat screen layout

I am currently using ListView for chat texts, but the problem is that to read long chats I need to scroll down, my screen does not scroll automatically.

I want this bubble to look like a chat layout.
How can I develop this kind of chat layout.
If you have any ideas on this, please share with me.

thank

+3
source share
4 answers

Here you will need a layout with a part of the header and footer, having as the main view ListView.

ListView Adapter, .

, itemRenderer (fromMe - fromOther).

, backgroundDrawable ( 9 , ) .

- , logcat, .

+7

this listView.

, , , .

+2


U
1) ListActivity, XML- ListView.
2) BaseAdapter, ListActivity.
3) BaseAdapter getView .
4) .
5) Listview Footer EditText View .

.. http://developer.android.com/reference/android/app/ListActivity.html

http://developer.android.com/reference/android/widget/BaseAdapter.html

+2

, , , .

if so, then try calling smoothScrollToPositionevery time something is added. I don’t know what your class looks like, but maybe it can run something like this (pseudocode)

customListview.addNewChat(...);
customListView.smoothScrollToPosition(customListView.getCount());
+1
source

All Articles