title: TranslationZ gets cropped at the top inside a relative layout
body: <p>I have this button shadow that has a translationZ of 8dp. The translation itself works but since it's inside a relation layout, for some reason the top part looks as if it were cropped to the shadow doesn't cover the top part of my round button shadow. I am not sure why this is happening but I noticed if my text view is set outside of the relative layout (which I cannot do, it has to be inside of it), it works well. Is there a workaround to solve this issue and get a complete shadow from the translationZ?</p>
  <p>This is the part:</p>
  <pre><code>&lt;androidx.cardview.widget.CardView
         android:id=&quot;@+id/cv_button_shadow&quot;
         android:layout_width=&quot;0dp&quot;
         android:layout_height=&quot;100dp&quot;
         app:cardCornerRadius=&quot;100dp&quot;
         app:cardBackgroundColor=&quot;@android:color/transparent&quot;
         app:cardElevation=&quot;0dp&quot;
         app:layout_constraintStart_toStartOf=&quot;@id/it_l_connection&quot;
         app:layout_constraintEnd_toEndOf=&quot;@id/it_connection&quot;
         app:layout_constraintTop_toTopOf=&quot;parent&quot;
         app:layout_constraintBottom_toBottomOf=&quot;parent&quot;&gt;
  
         &lt;RelativeLayout
             android:id=&quot;@+id/rl_button_shadow&quot;
             android:layout_width=&quot;match_parent&quot;
             android:layout_height=&quot;match_parent&quot;
             android:paddingTop=&quot;10dp&quot;&gt;
  
             &lt;TextView
                 android:id=&quot;@+id/tv_button_shadow&quot;
                 style=&quot;@style/Detail&quot;
                 android:layout_width=&quot;80dp&quot;
                 android:layout_height=&quot;80dp&quot;
                 android:background=&quot;@drawable/component_shadow_background&quot;
                 android:translationZ=&quot;8dp&quot; /&gt;
         &lt;/RelativeLayout&gt;
     &lt;/androidx.cardview.widget.CardView&gt;
  </code></pre>
  <p>Here's how it looks at the top:
  <a href="https://i.stack.imgur.com/OjrUO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OjrUO.png" alt="enter image description here" /></a></p>