在Android的UI更新 [英] Update UI in Android
问题描述
有在我的应用程序许多活动和应用程序(ApplicationEx类)中的一个子类。我的应用程序发送和接收SIP消息。如果收到新的消息再有就是ApplicationEx类接收消息的回调。从ApplicationEx类如何通知UI(具体活动)?而对于每一个消息,它是没有效率广播意图按照此链接。它可用于更新UI的方法呢?和这方法适合这种应用?
There are many activities in my application and one subclass of Application (ApplicationEx class). My application send and receive SIP messages. If new message is received then there is a callback of message received in ApplicationEx class. From ApplicationEx class how to inform UI (specific activity) ? And for every message it is not efficient to broadcast intent as per this link. Which methods available to update UI ? and which method suits for this application ?
推荐答案
我曾经处理程序更新UI。要更新UI我重写Handler.Callback的方法的handleMessage
I used handler to update UI. To update UI I override handleMessage method of Handler.Callback.
这篇关于在Android的UI更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!