setText is not updating

后端 未结 2 470
长发绾君心
长发绾君心 2021-01-19 01:34

Here is the code and i want to setText the Array of Textview after the random Images selected.. its not updating the textVew. I am passing Context and view to the construct

2条回答
  •  借酒劲吻你
    2021-01-19 02:13

    for anyone who is having this problem, you may have to place your setText method inside this

        ((Activity) context).runOnUiThread(new Runnable() { 
            @Override
            public void run() {
                ((EditText)editText).setText(text);
            }
        });
    

提交回复
热议问题