title: Is there any way to theme a preference dialog?
body: <p>I am using a custom theme for dialogs in my app.
  The custom theme applies to the alert dialogs just fine.
  But the theme does not apply on the preference dialogs like ListPreference, CheckboxPreference etc.</p>
  <p>Currently i am applying the dialog theme using the <strong>materialAlertDialogTheme</strong> attribute like this:</p>
  <p><strong>Main app theme:</strong></p>
  <pre><code>&lt;style name=&quot;AppTheme&quot; parent=&quot;Theme.MaterialComponents.Light.NoActionBar&quot;&gt;
      &lt;item name=&quot;colorPrimary&quot;&gt;@color/colorPrimary&lt;/item&gt;
      &lt;item name=&quot;colorPrimaryDark&quot;&gt;@color/colorPrimaryDark&lt;/item&gt;
      &lt;item name=&quot;colorAccent&quot;&gt;@color/colorAccent&lt;/item&gt;
      &lt;item name=&quot;android:navigationBarColor&quot;&gt;?attr/colorPrimary&lt;/item&gt;
      &lt;item name=&quot;android:windowTranslucentStatus&quot;&gt;true&lt;/item&gt;
  
      &lt;!-- Material Dialog theme --&gt;
      &lt;item name=&quot;materialAlertDialogTheme&quot;&gt;@style/ThemeOverlay.App.MaterialAlertDialog&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  <p><strong>MaterialDialog styles:</strong></p>
  <pre><code>&lt;!-- Styles for Material Dialogs --&gt;
  &lt;style name=&quot;ThemeOverlay.App.MaterialAlertDialog&quot; parent=&quot;ThemeOverlay.MaterialComponents.MaterialAlertDialog&quot;&gt;
      &lt;item name=&quot;colorSurface&quot;&gt;@android:color/white&lt;/item&gt;
      &lt;item name=&quot;alertDialogStyle&quot;&gt;@style/MaterialAlertDialog.App&lt;/item&gt;
      &lt;item name=&quot;materialAlertDialogTitleTextStyle&quot;&gt;@style/MaterialAlertDialog.App.Title.Text&lt;/item&gt;
      &lt;item name=&quot;buttonBarPositiveButtonStyle&quot;&gt;@style/Widget.App.PositiveButton&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name=&quot;MaterialAlertDialog.App&quot; parent=&quot;MaterialAlertDialog.MaterialComponents&quot;&gt;
      &lt;item name=&quot;shapeAppearance&quot;&gt;@style/ShapeAppearance.App.MediumComponent&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name=&quot;MaterialAlertDialog.App.Title.Text&quot; parent=&quot;MaterialAlertDialog.MaterialComponents.Title.Text&quot;&gt;
      &lt;item name=&quot;android:textStyle&quot;&gt;bold&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name=&quot;Widget.App.PositiveButton&quot; parent=&quot;Widget.MaterialComponents.Button.TextButton.Dialog&quot;&gt;
      &lt;item name=&quot;materialThemeOverlay&quot;&gt;@style/ThemeOverlay.App.Button&lt;/item&gt;
      &lt;item name=&quot;shapeAppearance&quot;&gt;@style/ShapeAppearance.App.SmallComponent&lt;/item&gt;
      &lt;item name=&quot;android:textAllCaps&quot;&gt;false&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name=&quot;ThemeOverlay.App.Button&quot; parent=&quot;&quot;&gt;
      &lt;item name=&quot;colorPrimary&quot;&gt;@android:color/black&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name=&quot;ShapeAppearance.App.MediumComponent&quot; parent=&quot;ShapeAppearance.MaterialComponents.MediumComponent&quot;&gt;
      &lt;item name=&quot;cornerFamily&quot;&gt;rounded&lt;/item&gt;
      &lt;item name=&quot;cornerSize&quot;&gt;8dp&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name=&quot;ShapeAppearance.App.SmallComponent&quot; parent=&quot;ShapeAppearance.MaterialComponents.SmallComponent&quot;&gt;
      &lt;item name=&quot;cornerFamily&quot;&gt;rounded&lt;/item&gt;
      &lt;item name=&quot;cornerSize&quot;&gt;4dp&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  <p><strong>Here is a dialog perfectly getting themed:</strong></p>
  <p><a href="https://i.stack.imgur.com/9tAv4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9tAv4.png" alt="enter image description here" /></a></p>
  <p><strong>And here is a preference dialog which is not getting themed (notice the corners):</strong></p>
  <p><a href="https://i.stack.imgur.com/g4jsL.png" rel="noreferrer"><img src="https://i.stack.imgur.com/g4jsL.png" alt="enter image description here" /></a></p>
  <p>I have also tried setting alertDialog attribute in the main theme, but its not working.</p>
  <p>Any suggestions?</p>