title: android how to add elevation to fragment
body: <p>I have a <a href="https://github.com/SeakyLuo/RandomMenu/blob/master/app/src/main/res/layout/fragment_food_card.xml" rel="nofollow noreferrer"><code>FoodCardFragment</code></a> that contains a <code>CardView</code>.</p>
  
  <p>And the <code>FoodCardFragment</code> is shown through the <code>FrameLayout food_card_view</code> of <a href="https://github.com/SeakyLuo/RandomMenu/blob/master/app/src/main/res/layout/fragment_random.xml" rel="nofollow noreferrer"><code>RandomFragment</code></a>.</p>
  
  <p>The code of <code>RandomFragment</code> showing <code>FoodCardFragment</code> can be found <a href="https://github.com/SeakyLuo/RandomMenu/blob/master/app/src/main/java/personalprojects/seakyluo/randommenu/RandomFragment.java" rel="nofollow noreferrer">here</a>.</p>
  
  <p>I have tried giving either the <code>Fragment</code> or the <code>FrameLayout</code> elevation, but on my cell phone, it is still not floating above the <code>RandomFragment</code>.</p>
  
  <p>How should I add it?</p>
  
  <p><a href="https://i.stack.imgur.com/rsiye.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rsiye.jpg" alt="enter image description here"></a></p>