ProgressDialog does not want to update the message

后端 未结 1 1698
一生所求
一生所求 2020-12-05 00:34

I just tried to implement a progressdialog and I have some issues to change the text during my long and complex calculations.

for (String aString:myStringArr         


        
相关标签:
1条回答
  • 2020-12-05 00:51

    Just found the answer, that's working fine:

    runOnUiThread(changeMessage);
    

    with that code:

    private Runnable changeMessage = new Runnable() {
        @Override
        public void run() {
            //Log.v(TAG, strCharacters);
            m_ProgressDialog.setMessage(strCharacters);
        }
    };
    
    0 讨论(0)
提交回复
热议问题