Here is my issue, I am working on the Ads integration for my Mobile Application.
In order to display a banner, I have created a BannerFragment.
I want to display this banner in all of my Activities, so that I have included it in a ActionBarAbstractActivity layout.


This allow me to display my Banner on all of my Activities without working on their XML files.
But, I have one specific Activity where I don't want to display Ads.
That's why I need to hide the Banner in this Activity. How can I access the BannerFragment in this Activity even if it's not referenced in its XML layout ?
I tried to find the Fragment by ID and hide it, but it's not working.
Should I create my proper banner container for this activty and set the visibility to "HIDE" or "GONE" ?
You can change the visibility property of the linear layout itself to hide/show the fragment.
Use an id for the LinearLayout in the XML.
In your activity,
To hide the layout,
To show the layout,