小弟新手,今天读了google的gesture的DEMO,就是想画个手势启动个想启动的程序,怎么实现啊?

解决方案 »

  1.   

    创建一个GestureDetector对象(在创建的时候就可以加入GestureDetector.OnGestureListener监听器),在监听器中实现你需要所需的具体工作
      

  2.   

    建议看看 1.android.view.GestureDetector、                                                             2.android.view.GestureDetector.OnGestureListener
            3.android.content.Intent
    这几个类,应该会满足你的需求。
      

  3.   

    你要开什么程序   是一个activity还是别人写好的application
      

  4.   

    别人写好的APP啊,比如我点一个BUTTON实现打开QQ客户端
      

  5.   

    new Intent(FromActivity.this, ToActivity.class);
    你可以看看android.content.Intent
      

  6.   

    我怎么知道QQ客户端的activity?
      

  7.   


    你在调试状态下打开qq客户端,查看Log信息有个Displayed后面跟的就是这个值
      

  8.   


     ComponentName component = 
                            new ComponentName("包名",
                                "包名+类名");
                        Intent intent = new Intent();
                        intent.setComponent(component);
                        intent.setAction("android.intent.action.MAIN");
                        intent.addCategory("android.intent.category.LAUNCHER");
                        startActivity(intent);再使用这种方法打开
      

  9.   

    确实正确啊,大哥告诉我应该怎么查到这个答案啊?在API么?