title: Android: Button visible through overlapping fragment
body: <p>i am a newbie so please keep that in mind.</p>
  
  <p>I just added a fragment to my Main Activity (for the first time ever). The container for that fragment is a FrameLayout which i just put on top of the existing Relative Layout.
  I can already switch between showing the fragment and removing it again.</p>
  
  <p>There is only one problem: The buttons from the Main Activities' RelativeLayout are visible through the fragment, even though it has a background color.</p>
  
  <p>Is there a simple way to get the buttons not showing through the fragment (but still be visible when i remove the fragment). I dont want to set them invisible and visible manually, because they only show up unter certain circumstances in the Main Activity.</p>
  
  <p>One solution is probably, to replace the layout, that containts the buttons and everything else, with the fragment. But i wonder if there is a different solution because my Layout file is not set up properly to make that easily doable.</p>
  
  <p><a href="https://i.stack.imgur.com/jRd2g.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jRd2g.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/RSH7V.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RSH7V.png" alt="enter image description here"></a></p>