What is the difference b/w these two:
FrameLayout customView = (FrameLayout) view.getRootView();
FrameLayout customView = (FrameLayout) activity.getWindow().getDecorView();
What is the difference b/w these two:
FrameLayout customView = (FrameLayout) view.getRootView();
FrameLayout customView = (FrameLayout) activity.getWindow().getDecorView();
activity.getWindow().getDecorView(); it gives refernce to the outermost layout... while view.getRootView() gives the refernce to the layout containing the view..
I think getRootView() finds the topmost view in the current ViewGroup where getDecorView returns an instance of all the items of ViewGroup.