I know how to get the root view with View.getRootView(). I am also able to get the view from a button\'s onClick
event where the argument is a View. But how can
if you are in a activity, assume there is only one root view,you can get it like this.
ViewGroup viewGroup = (ViewGroup) ((ViewGroup) this
.findViewById(android.R.id.content)).getChildAt(0);
you can then cast it to your real class
or you could using
getWindow().getDecorView();
notice this will include the actionbar view, your view is below the actionbar view