Example usage for android.os Handler sendMessageAtFrontOfQueue

List of usage examples for android.os Handler sendMessageAtFrontOfQueue

Introduction

In this page you can find the example usage for android.os Handler sendMessageAtFrontOfQueue.

Prototype

public final boolean sendMessageAtFrontOfQueue(Message msg) 

Source Link

Document

Enqueue a message at the front of the message queue, to be processed on the next iteration of the message loop.

Usage

From source file:com.abiansoftware.lib.reader.AbianReaderApplication.java

public void sendDataUpdatedMessage() {
    for (int i = 0; i < m_handlerVector.size(); i++) {
        Handler thisHandler = m_handlerVector.get(i);

        if (thisHandler != null) {
            //thisHandler.sendEmptyMessage(AbianReaderApplication.MSG_DATA_UPDATED);
            Message newMessage = Message.obtain();
            newMessage.what = AbianReaderApplication.MSG_DATA_UPDATED;
            thisHandler.sendMessageAtFrontOfQueue(newMessage);
        }/* w w w . j  a  va  2  s. c o  m*/
    }

    /*
    for(int i = 0; i < m_adapterVector.size(); i++)
    {
    BaseAdapter thisAdapter = m_adapterVector.get(i);
            
    if(thisAdapter != null)
    {
        //thisAdapter.notifyDataSetChanged();
    }
    }
    */
}