标签:style blog ar color 使用 sp java 数据 on
private Handler handler; private Looper looper; private Thread myThread=new Thread() { public void run() { Looper.prepare(); looper=Looper.myLooper(); handler=new Handler(looper) { @Override public void handleMessage(Message msg) { Log.d("test","what="+msg.what); } }; handler2=new Handler(looper,new Handler.Callback() { @Override public boolean handleMessage(Message msg) { Log.d("test","what2="+msg.what); return false; } }); Looper.loop(); } };
Button btn=(Button)findViewById(R.id.stop_btn); btn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if(flag) { looper.quit(); }else{ } } });
标签:style blog ar color 使用 sp java 数据 on
原文地址:http://blog.csdn.net/wode_dream/article/details/41517127