2010.08.03 Android note

*Touch Evnet实验
如果回调是按时间触发的,所以不停的进入这个方法,即使event一直是Move
@Override
   public boolean onTouchEvent(MotionEvent event){
  super.onTouchEvent(event); 
  view.setText(view.getText()+";"+event.getAction());
  return true;
   }
  
*Notify
public void Notify(String msg){
    NotificationManager manager=(NotificationManager)this.getSystemService(Context.NOTIFICATION_SERVICE);
    Notification not=new Notification(R.drawable.icon,"SHow",System.currentTimeMillis());
    PendingIntent intent= PendingIntent.getActivity(this, 0, new Intent(this,ImageActivity.class), 0);
    not.setLatestEventInfo(this, "title", msg, intent);
    manager.notify(1,not);
   }
posted on 2011-08-02 19:04  林骄  阅读(100)  评论(0)    收藏  举报