android 括号问题
大家好,谁能帮我解决这个问题,我有括号问题,有 1 个是多余的或丢失的,找不到它,
谢谢
Handler speedHandler = new Handler();
Runnable unitspeedtimer = new Runnable() {
public void run() {
speedTextView=(TextView)findViewById(R.id.speedTextView);
MaxspeedTextView=(TextView)findViewById(R.id.MaxspeedTextView);
//1 m/s = 3.6 km/h
float MySpeed = location.getSpeed() * 3.6;
float MaxSpeed = 75.00;
Timer updateTimer = new Timer("velocityUpdate");
updateTimer.scheduleAtFixedRate(new TimerTask() {
public void run() {
updateGUI();
}
}, 0, 3000);
}
hi to all can any one help me with this problem i have brackets problem there is 1 that is either extra or missing cant find it
thank you
Handler speedHandler = new Handler();
Runnable unitspeedtimer = new Runnable() {
public void run() {
speedTextView=(TextView)findViewById(R.id.speedTextView);
MaxspeedTextView=(TextView)findViewById(R.id.MaxspeedTextView);
//1 m/s = 3.6 km/h
float MySpeed = location.getSpeed() * 3.6;
float MaxSpeed = 75.00;
Timer updateTimer = new Timer("velocityUpdate");
updateTimer.scheduleAtFixedRate(new TimerTask() {
public void run() {
updateGUI();
}
}, 0, 3000);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最后还需要一个
};
来关闭 Runnable。一致的缩进在这里确实很有帮助。You need one more
};
at the end to close the Runnable. Consistent indentation would really help here.