How to update a TextView from within onPostExecute

后端 未结 2 746
渐次进展
渐次进展 2021-01-17 07:02

Need help here, about onPostExecute. If I want to put the update on textView what should be the code and what should I do?.

@Override
protected Value[] doIn         


        
2条回答
  •  离开以前
    2021-01-17 07:14

    If you want get last value from Ubidots to your textview. You can try this, but u must set the textview first OnCreate

    @Override
            protected void onPostExecute(Value[] variableValues) {
                // Update your views here
    
                String status = Double.toString(variableValues[0].getValue());
    //this is textview for show last value from ubidots
                mBatteryStatus.setText(status);
    
            }
        }
    

提交回复
热议问题