title: Toast Android 11 customization
body: <p>In Android 11 <code>Toast.setView()</code> is deprecated.<br />
  I wanted to now if there is a way to achieve similar results without using <code>setView()</code> like custom font, background color, corner radius etc.<br />
  Below you can find my current view I was using in <code>setView()</code>.</p>
  <pre><code>&lt;com.google.android.material.card.MaterialCardView 
  xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
  android:layout_width=&quot;wrap_content&quot;
  android:layout_height=&quot;wrap_content&quot;
  xmlns:tools=&quot;http://schemas.android.com/tools&quot;
  android:clickable=&quot;false&quot;
  android:focusable=&quot;false&quot;
  app:cardElevation=&quot;0dp&quot;
  app:cardBackgroundColor=&quot;@color/primary_dark&quot;
  android:alpha=&quot;0.9&quot;
  app:cardCornerRadius=&quot;@dimen/radius_toast&quot;&gt;
  
  &lt;FrameLayout
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;&gt;
  
      &lt;TextView
          android:id=&quot;@+id/toast_dark_tv&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:minWidth=&quot;@dimen/height_toast&quot;
          android:gravity=&quot;center&quot;
          android:paddingVertical=&quot;@dimen/radius_toast&quot;
          android:layout_marginHorizontal=&quot;@dimen/radius_toast&quot;
          android:layout_gravity=&quot;center_vertical&quot;
          android:fontFamily=&quot;@font/playfair_display_regular&quot;
          tools:text=&quot;Custom toast text&quot;
          android:textColor=&quot;@color/primary&quot;
          android:textSize=&quot;@dimen/text_size_regular_14sp&quot; /&gt;
  &lt;/FrameLayout&gt;
  &lt;/com.google.android.material.card.MaterialCardView&gt;
  </code></pre>