android - how can i get a reference to the top level view to set an onTouch event? -
Can you please help me or give me an example of this code, Need to set touch listener when activity gets touched then a new activity will start? Just do not know how to do this and want to see the code so that I can do my work
Thank you very much
your And then you can set your layout.xml
onCreate () You can get this view by calling
activity in the method:
See root = seeById (R.id .RootView);
OnTouchListener These are:
root.setOnTouchListener (New On-TouchListener) {@Override public boolean onTouch (see V, Motion Event Event) {startActivity (New Intent (Current Activity., MyNewActivity.class ); // True, the use of the event was malfunctioning;}});
Comments
Post a Comment