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. adding voice search

I want to add a voice search button to one of my apps but I can't seem
to find documentation on it anywhere.  Can someone give me an example
or point me to one?
Thanks!

-- 

2. Strange error with AdMob

I have already posted on their developer group but based on everything I've
seen I don't expect a reply.

I have a strange problem.   When I added and adview to my app it imported a
bunch of comments that all start with /**   Eclipse is acting like it is not
a comment.  Although it isn't erroring out it has now marked anything
starting with R.id as not existing.   Is this something I can remedy in
eclipse or is it time to chuck my dreams of being mega rich off of all the
admob revenue I will be receiving?

Example of the beginning of my R.java:
public final class R {
    public static final class attr {
        /** <p>Must be a color value, in the form of
"<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
         */
        public static final int backgroundColor=0x7f010001;
        /** <p>Must be a boolean value, either "<code>true</code>" or
"<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
         */
        public static final int isGoneWithoutAd=0x7f010005;
        /** <p>Must be a string value, using '\\;' to escape characters such
as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
         */
        public static final int keywords=0x7f010003;
        /** <p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
         */
        public static final int refreshInterval=0x7f010004;
        /** <p>Must be a boolean value, either "<code>true</code>" or
"<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
         */
        public static final int testing=0x7f010000;
        /** <p>Must be a color value, in the form of
"<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
         */
        public static final int textColor=0x7f010002;
    }

-- 
Writing code is one of few things
that teaches me I don't know everything.

Join the Closed Beta of Call Girl Manager
http://www.fuligin.com/forums

-- 

3. Android 2.1 bug: uses res/layout-v3 instead of res/layout

4. Creating dialogs from a thread

5. Phone.apk crashes due to failure loading resource dtmf_twelve_key_dialer.xml

6. How to forward a phone call to voice mail ?

7. surfaceview + glsurfaceview + framelayout