title: Set Google style bottomsheet Dialog in Android Studio App?
body: <p>This is my code that gives a BottomSheet Dialog. After implementation it gives me a normal BottomSheet Dialog, how can i make this Bottom Sheet look like Google BottomSheet Dialog with rounded corners and something like a middle gray line at the top?</p>
  <p>Even if it doesn't look exactly like the Bottomsheet Facebook and Google uses, I just want to have a rounded corner for this code.</p>
  <p>What do I change or add in my code?</p>
  <p><code>MainActivity.Java </code></p>
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          Button button = (Button) findViewById(R.id.button);
          button.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  openDialog();
              }
          });
  }
  
  private void openDialog() {
          View view = getLayoutInflater().inflate(R.layout.sheet_main, null);
          dialog = new BottomSheetDialog(this);
          dialog.setContentView(view);
          TextView camera_sel = (TextView) view.findViewById(R.id.camera);
          TextView gallery_sel = (TextView) view.findViewById(R.id.gallery);
          camera_sel.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  takePhotoFromCamera();
                  dialog.dismiss();
              }
          });
          gallery_sel.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  takePhotoFromGallery();
                  dialog.dismiss();
              }
          });
          dialog.show();
  }
  
  </code></pre>
  <p><code>sheet_main.xml </code></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:orientation=&quot;horizontal&quot;
      android:padding=&quot;4dp&quot;&gt;
  
      &lt;TextView
          android:id=&quot;@+id/camera&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_weight=&quot;1&quot;
          android:background=&quot;?attr/selectableItemBackgroundBorderless&quot;
          android:clickable=&quot;true&quot;
          android:drawablePadding=&quot;8dp&quot;
          android:drawableTop=&quot;@drawable/ic_camera&quot;
          android:gravity=&quot;center_horizontal&quot;
          android:padding=&quot;16dp&quot;
          android:text=&quot;Camera&quot;
          android:textSize=&quot;18sp&quot; /&gt;
  
      &lt;TextView
          android:id=&quot;@+id/gallery&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_weight=&quot;1&quot;
          android:background=&quot;?attr/selectableItemBackgroundBorderless&quot;
          android:clickable=&quot;true&quot;
          android:drawablePadding=&quot;8dp&quot;
          android:drawableTop=&quot;@drawable/ic_panorama&quot;
          android:gravity=&quot;center_horizontal&quot;
          android:padding=&quot;16dp&quot;
          android:text=&quot;Gallery&quot;
          android:textSize=&quot;18sp&quot; /&gt;
  
  &lt;/LinearLayout&gt;
  
  </code></pre>
  <p>UPDATE:</p>
  <p>I was able to achieve this by adding these to my style.xml and setting it on the theme used for my dialog activity. Thanks!</p>
  <pre><code>&lt;style name=&quot;HomeTheme&quot; parent=&quot;Theme.MaterialComponents.Light.NoActionBar&quot;&gt;
        &lt;item name=&quot;bottomSheetDialogTheme&quot;&gt;@style/ThemeOverlay.Demo.BottomSheetDialog&lt;/item&gt;
   &lt;/style&gt;
  
   &lt;style
       name=&quot;ThemeOverlay.Demo.BottomSheetDialog&quot;
       parent=&quot;@style/ThemeOverlay.MaterialComponents.BottomSheetDialog&quot;&gt;
       &lt;item name=&quot;bottomSheetStyle&quot;&gt;@style/Widget.Demo.BottomSheet&lt;/item&gt;
   &lt;/style&gt;
  
   &lt;style name=&quot;Widget.Demo.BottomSheet&quot; parent=&quot;Widget.MaterialComponents.BottomSheet&quot;&gt;
       &lt;item name=&quot;shapeAppearanceOverlay&quot;&gt;@style/ShapeAppearanceOverlay.Demo&lt;/item&gt;
   &lt;/style&gt;
  
   &lt;style name=&quot;ShapeAppearanceOverlay.Demo&quot; parent=&quot;&quot;&gt;
       &lt;item name=&quot;cornerSize&quot;&gt;18dp&lt;/item&gt;
       &lt;item name=&quot;cornerFamily&quot;&gt;rounded&lt;/item&gt;
   &lt;/style&gt;
  </code></pre>