How to make chat window for IM?

by Gulfam » Wed, 12 Aug 2009 22:28:26 GMT


Sponsored Links
 Hi every body,

    I am working on IM and i want to make Chat Window but i don't know
how to start it. Currently I am using EditText field, a text view and
a button, after entering text in EditText field on pressing send
button i am getting text from EditText filed and appending it to
TextView its looking good but there are some problems, and i don't
know its right approach or not ? Any one can refer me any tutorial or
any useful link regarding this or any other help ?.

Thanks  in advance.

Gulfam Hassan
--~--~---------~--~----~------------~-------~--~----~



How to make chat window for IM?

by Jeff Sharkey » Thu, 13 Aug 2009 14:37:02 GMT


 If you'll be working with long conversations, you should look at using
a ListView to keep scrolling efficient.  Also, ListView offers
android:transcriptMode, which will can help automatically scroll back
to the bottom when new messages arrive.

j






-- 
Jeff Sharkey
jshar...@android.com

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to make chat window for IM?

by Gulfam » Thu, 13 Aug 2009 17:50:48 GMT


 Hi,

  I have tried way recommended by Jeff but i think its not perfect
solution
 any one can help more regarding this.
Jeff V V Thanks for your response.

Regards
Gulfam Hassan




--~--~---------~--~----~------------~-------~--~----~



How to make chat window for IM?

by Yusuf Saib (T-Mobile USA) » Fri, 14 Aug 2009 02:34:12 GMT


 Can you give more details on the problems you encountered with
TextView or ListView?




Yusuf Saib
Android
T  Mobile stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.







--~--~---------~--~----~------------~-------~--~----~



How to make chat window for IM?

by Gulfam » Fri, 21 Aug 2009 14:57:45 GMT


 i Yusuf Saib,

Sorry for late response because i was on leave.

Using TextView for chat window i have get the idea form APIDemos-
I have modifiy that code just like this replace add button with
EditText and put it at the bottom of screen with send button same like
default messaging application (compose new message screen). After
typing chat message i am getting the text from EditText and apending
it to TextView its working fine but the problem is this when text
length or lines reaches at the bottom of screen text in TextView is
not scrolling upwards its behavior is same like LogTextBox but i need
to scroll it upward automatically.For example TextView can show 1 to
10 lines at a time but when i add 11th line i need TextView scroll one
line upward and show me 2 to 11 lines and so on its scrolling upwards
line by line. How it is possible?

I am saving this text in string array line by line against a userId in
hash table.Now i moved from chatwindow to contacts list and again
comeback on chatwindow.For example i have added 100 lines before
moving to contacts list and when i comeback on chatwindow I need its
show me last 10 lines form 91 to 100. How I can do it? its right
approach to make chat window? any useful link or tutorial?

Hopes you understand my problem.

Thanks,
Gulfam Hassan

On Aug 13, 11:34pm, "Yusuf Saib (T-Mobile USA)" <yusuf.s...@t-
Mobile.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



How to make chat window for IM?

by Yusuf Saib (T-Mobile USA) » Sat, 22 Aug 2009 02:14:19 GMT


 hat happened when you tried ListView with transcript mode?


Yusuf Saib
Android
T Mobile stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.




On Aug 20, 11:57pm, Gulfam <gulfa...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. error message with MediaPlayer

hi all,


I try to recived rtsp or mms audio stream for a long time,
simply use the code to recive audio stream:

myPlayer1.setDataSource("mms://....");
myPlayer1.prepare();
myPlayer1.start();

I search for this topic for all discussions,
and get some conclusions from all discussions:

(a) sdk 1.1 not support for stream but sdk 1.5 could.


(b) someone says stream can't work on the emulator because the
firewall issue.But in fact,my computer without firewall,and i also try
in the htc G1 mobile but still can't work!(sdk 1.1)

(c)almost everyone got the same error from "prepare()" function.the
error message from "adb logcat" i post bellow

E/PlayerDriver(  542): Command PLAYER_SET_DATA_SOURCE completed with
an error or info PVMFErrNotSupported
E/MediaPlayer(  741): error (1, -4)


can someone or android engineer give some tips?
because i search for this topic long time,and no answer,no one can
success.


thanks a lot.


--~--~---------~--~----~------------~-------~--~----~

2. OpenIntent Simulator - Get black screen when selecting SensorSimulator

Hi,

I am trying to run the openintent sensor simulator on Windows XP, SDK
1.5, (Google API).

I get a black screen whenever I open the sensorsimulator application
on my emulator, while it looks like I should get a screen asking me
for an IP address.

They are numerous reports of this issue on the openintent website, but
nobody seems to have an anser there.
Anybody knows what should be done to fix this issue?

Thanks,
Jean

--~--~---------~--~----~------------~-------~--~----~

3. How do I access a URI such as content://drm/audio/2 (which is a ringtone)

4. LCD flicker when I use the softkeyboard

5. Intercepting bluetooth device buttons

6. Handling long clicks properly

7. Can I calculate the user's moving speed by phone?