runOnUiThread(new Runnable(){}) is undefined for the type new Thread(){}

前端 未结 3 1655
时光取名叫无心
时光取名叫无心 2021-01-01 18:31

Looking at the part:

runOnUiThread(new Runnable() {

I have the problem:

The method runOnUiThread(new Runnable(){}) is undef         


        
3条回答
  •  佛祖请我去吃肉
    2021-01-01 19:37

    You have to setOnClickListener that you haven't set in your code like

    Button confirm = (Button) dialog.findViewById(R.id.btn_confirm);
    confirm.setOnClickListener(new OnClickListener() 
    {
    
        @Override
        public void onClick(View v)
        {
            your call to method...
        }
    });
    

提交回复
热议问题