Reputation: 11
I am working with android.Is there any idea to place a view over the current view of the activity.I want to dynamically get the current view and the place my custom view over that current view .For example a gif image in the game screen .I had worked with inflater,but it doesn't work. Is it possible to make?? Please help me
Upvotes: 0
Views: 182
Reputation: 2302
You can add the View to the decor view of your activity.
ViewGroup decor = (ViewGroup) Activity.getWindow().getDecorView();
decor.addView(yourViewThatWillShowOnTopOfAllOthers);
Upvotes: 1