I am developing one chat application and I want to create a chat screen layout, for example, the next screen.
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
Here you will need a layout with a part of the header and footer, having as the main view ListView.
ListView
ListView Adapter, .
Adapter
, itemRenderer (fromMe - fromOther).
fromMe
fromOther
, backgroundDrawable ( 9 , ) .
backgroundDrawable
- , logcat, .
this listView.
, , , .
U1) 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
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)
smoothScrollToPosition
customListview.addNewChat(...); customListView.smoothScrollToPosition(customListView.getCount());