Android Dialog theme with round corners



So I have created many different dialogs within my app and I have applied to a style to all of them. Like this:



custAlertDialog = new Dialog (context, Resource.Style.customizedAlertSlideUpAndDown);


This is how I have done customizedAlertSlideUpAndDown:



<style name="customizedAlertSlideUpAndDown" parent="@android:style/Theme.Dialog">
<item name="android:windowAnimationStyle">@style/slideUpAndDown</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>

<style name="slideUpAndDown">
<item name="android:windowEnterAnimation">@anim/anim_popup_slideup</item>
<item name="android:windowExitAnimation">@anim/anim_popup_slidedown</item>
</style>


So each time dialog's .Show() is called, it slides in from bottom of the screen to the center and when .Dismiss() is called, it slides down from center of the screen to the bottom.


Now I want to make all these dialogs' corners round.

How can I do that?


Thanks for your time.


No comments:

Post a Comment