When I use TextView to display a text, and set the background color for a example to grey, then the displayed text looks absorbed by this background color. So my idea was to add the TextView to CardView, give the Cardview the backgroundColor, and set the elevation of TextView higher then CardView, but it is still the same. I even tried to add in CardView a Layout with Textview inside and set the elevation of the Layout higher. I want the displayed text floating above the View. Do someone have an idea how to solve that problem?
Here is a screenshot of what I mean. When you look on the elements you can see a slim layer (lamination) of grey over the smileys: https://drive.google.com/file/d/1W2E6Ivom0WEyrTtqBeLu1Z3rtHdMXKKS/view?usp=drivesdk
And here is the last code:
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="viewEnd"
android:layout_gravity="end"
android:layout_margin="6dp"
app:cardCornerRadius="5dp"
android:elevation="20dp"
android:background="#80817c">
<TextView
android:textSize="18sp"
android:textAlignment="viewEnd"
android:layout_gravity="end"
android:id="@+id/user_ping"
android:layout_margin="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="siema"
android:elevation="25dp"/>
</androidx.cardview.widget.CardView>