如何创建Android的聊天屏幕? [英] How to create a chat screen in Android?

查看:190
本文介绍了如何创建Android的聊天屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个Android聊天应用程序。我想聊天屏幕包括像一个新的UI屏幕聊天线程使用不同的用户功能。但我不知道它进一步的移动。我应该使用服务或asyntask或有任何其他方式。请帮我上手。

I'm creating an Android chat application. I want chat screen to include features like a new UI screen for chat thread with a different user. But I don't know to move further with it. Should I use service or asyntask or is there any other way. Please help me get started.

推荐答案

没有。如果您使用的每个线程的每个用户,将产生多个线程(内存和时间去创造和明确的...)。

No. if you use each thread for each user, you will spawn many threads (memory, and time to create and clear...).

您应该使用服务来听时收到的消息(这是通过使用意图一件容易的工作),你可以在你的主UI线程做的。

You should use a service to listen when receive message (this is an easy work by using intent), and you can do in your main UI Thread.

这篇关于如何创建Android的聊天屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆