同时显示数值,旋转图片,发送数据,需要多线程实现吗? 如果需要,如何实现?大家简单的用A,B,C分别表示显示,旋转,发送即可,谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 手机采集到数据后,使用线程或异步Async任务来更新UI! 关于异步给你个连接http://blog.csdn.net/trent1985/article/details/23285173 大神方便留个QQ吗,还有些小问题想请教,谢谢啦有事邮件吧,QQ基本不用! 后台获取数据,之后用hanlder刷新主线程ui 这图片旋转应该是动画吧,把imageview加载好动画,用异步Async实现,很简单的,,, /*-----主线程部分代码---*/private Handler handler = new Handler(){ @Override public void handleMessage(Message msg) { if (msg.what == 1) { textView.setText(msg.arg1+"°");//显示角度 } super.handleMessage(msg); } //开启子线程,,,new Thread(){ @Override public void run(){ Message message = new Message(); message.what = 1; message.arg1 = degree; handler.sendMessage(message); } }.start();这样处理了图片还是不能正常旋转啊,求大神QQ指导 使用Handler 机制可以吗,请看9楼!还是没解决,求QQ指导啊 try{ /**旋转动画*/ RotateAnimation animation = new RotateAnimation(predegree, degree, Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f); animation.setDuration(200); imageView.startAnimation(animation); predegree=-degree;//图片旋转 }catch(Exception e){ System.out.println("Exception:"+e); return; }求QQ啊,在线等,在这里说不清。谢谢啦 请问如何实现局域网内用手机下载文件? android调用百度地图,怎么添加备注! 一列edittext控件,如何在第一个输入完成 点确定时,失去焦点? android 加密有人懂吗 一个普通的button如果设置其边框的颜色? android 前置 预览正常,拍照左右翻转 180度 如何调试开源C++源代码 全屏的时候,软键盘上弹,界面往上移,如何解决这问题 系统自带音乐播放器问题!!!!! 如何定位自己app扫描速度慢的原因? service与线程的联系 如何从RequestListener接口下的onComplete方法中获取json字符串,并返回
大神方便留个QQ吗,还有些小问题想请教,谢谢啦有事邮件吧,QQ基本不用!
private Handler handler = new Handler(){
@Override
public void handleMessage(Message msg) {
if (msg.what == 1) {
textView.setText(msg.arg1+"°");//显示角度
}
super.handleMessage(msg);
}
//开启子线程,,,
new Thread(){
@Override
public void run(){
Message message = new Message();
message.what = 1;
message.arg1 = degree;
handler.sendMessage(message);
}
}.start();
这样处理了图片还是不能正常旋转啊,求大神QQ指导
使用Handler 机制可以吗,请看9楼!
还是没解决,求QQ指导啊
try{
/**旋转动画*/
RotateAnimation animation = new RotateAnimation(predegree, degree,
Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
animation.setDuration(200);
imageView.startAnimation(animation);
predegree=-degree;//图片旋转
}catch(Exception e){
System.out.println("Exception:"+e);
return;
}
求QQ啊,在线等,在这里说不清。谢谢啦