Skip to content

Instantly share code, notes, and snippets.

@ch8n
Created October 24, 2018 07:04
Show Gist options
  • Save ch8n/66d521064146730e9ee970e2308f9173 to your computer and use it in GitHub Desktop.
Save ch8n/66d521064146730e9ee970e2308f9173 to your computer and use it in GitHub Desktop.
Change alert box with using styles
<!--In style.xml -->
<style name="CustomDialog" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="colorAccent">@color/accent_color</item>
<item name="android:windowMinWidthMajor">@dimen/dialog_min_width_major</item>
<item name="android:windowMinWidthMinor">@dimen/dialog_min_width_minor</item>
<item name="android:windowBackground">@color/transparent</item>
</style>
<!--In dimesn.xml -->
<item name="dialog_min_width_major" type="dimen">65%</item>
<item name="dialog_min_width_minor" type="dimen">80%</item>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment