title: How do I change the background of a shape with a corner radius?
body: <p>I created a intent that gets shown when I click a button, that intent has the theme of a shape which looks like this </p>
  
  <pre><code>&lt;shape xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
      &lt;gradient android:startColor="#4568dc"
                android:endColor="#b06ab3"
                android:angle="45"/&gt;
  
      &lt;corners android:radius="20dp"/&gt;
  
  &lt;/shape&gt;
  </code></pre>
  
  <p>The only issue though is that with the corner radius it's showing the white background around the corners, how do I get rid of that? I want it to be transparent.</p>
  
  <p>I added this as well, but it didn't change the corners.</p>
  
  <pre><code>&lt;style name="AppTheme.PopMe"&gt;
      &lt;item name="android:windowIsTranslucent"&gt;true&lt;/item&gt;
      &lt;item name="android:windowCloseOnTouchOutside"&gt;true&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>Added layout</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".AddItemActivity"
      android:background="@drawable/popbg"&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p><strong>Manifest</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.tester.tester"&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:roundIcon="@mipmap/ic_launcher_round"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
          &lt;activity android:name=".AddItemActivity"
                    android:theme="@style/AppTheme.PopMe"&gt;&lt;/activity&gt;
          &lt;activity android:name=".MainActivity"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p><strong>FloatingActionBar onClick</strong></p>
  
  <pre><code>    public void ShowPopup(View v){
  
              myDialog.setContentView(R.layout.activity_add_item);
  
              categorySpinner = myDialog.findViewById(R.id.spinnerCategory);
              ArrayAdapter&lt;String&gt; spinnerAdapter = new ArrayAdapter&lt;String&gt;(getContext(), android.R.layout.simple_list_item_1, getResources().getStringArray(R.array.options));
              spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
              categorySpinner.setAdapter(spinnerAdapter);
  
  
  
  myDialog.show();
      }
  </code></pre>
  
  <p>and AddItemActivity</p>
  
  <pre><code>public class AddItemActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_add_item);
  
          DisplayMetrics dm = new DisplayMetrics();
          getWindowManager().getDefaultDisplay().getMetrics(dm);
  
          int width = dm.widthPixels;
          int height = dm.heightPixels;
  
          getWindow().setLayout((int) (width * .8), (int) (height * .8));
  
          WindowManager.LayoutParams params = getWindow().getAttributes();
          params.gravity = Gravity.CENTER;
          params.x = 0;
          params.y = -20;
  
          getWindow().setAttributes(params);
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/QnC8u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QnC8u.png" alt="enter image description here"></a></p>