In my activity there are ActionBar,ListView,ContextMenu,Menu
.
I wanted to capture the user interaction with my activity(means when ever user touch in my activity i wanted to show a toast).I use this
@Override
public void onUserInteraction()
{
Toast.makeText(this, "Hello",Toast.LENGTH_LONG).show();
}
This method working with in screen but problem with this method its not working with
Menus,ContextMenu(ListView)
.
Working Scenario:- 1-This is working first time when i touch the screen Every where in activity (ActionBar,ListView).
2-After clicking the Menus
first time this method is calling and if the Menu
is related to activity (if i want to go on next activity ) it is working fine but there is a Menu
REFRESH
in same activity ,i do not know why this method not calling on clicking on REFRESH
.
3- The same problem with ContextMenu
(comes after long press on ListView
)
I tried GestureDetecter
also.
There is any particular method or anything in android ,which can detect the user touch every time in menus,contextmenu,list,screen or every where.
Lots of Thanks