I have gone through some solutions but none solve my issue.
I have created a custom DialogFragment
. and root element of dialog is cardView
. I set cardCornerRadius
of cardView
.
Then i try to set Transparent Dialog because background color is also showing with it.
then i try to set the dialog theme like
<style name="PauseDialog" parent="@style/Theme.AppCompat.Light.Dialog">
<!-- TTheme.AppCompat.Translucent-->
<item name="android:windowAnimationStyle">@style/PauseDialogAnimation</item>
<!--<item name="android:windowBackground">@android:color/transparent</item>-->
<item name="android:windowBackground">@color/transparent</item>
<item name="android:colorBackgroundCacheHint">@android:color/transparent</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowTitleStyle">@null</item>
<item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
<item name="android:backgroundDimEnabled">false</item>
<item name="android:background">@android:color/transparent</item>
</style>
The background still remains there. And then I also tried
dialog.getWindow().setBackgroundDrawable(
new ColorDrawable(Color.TRANSPARENT));
but still dialog have background associated with it.
Is there any work around. How could i get rid of it.
I have created a DialogFragment and in onCreateDialog
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(),
R.style.PauseDialog);
setStyle(DialogFragment.STYLE_NO_FRAME, R.style.PauseDialog);