I am opening dialog on click below android 9.0 there is no glitch or flickering while its opening but below android 8.0 and below its opening smoothly .
i tried to changes style with below but then also its not working
<style name="mystyle" parent="@android:style/Theme">
<item name="android:windowIsFloating">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
</style>
public Dialog displayInPaddedScreenDialog(Context context, View view, DialogInterface.OnDismissListener onDismissListener) {
Dialog dialog = new Dialog(context, R.style.mystyle);
dialog.getWindow().getAttributes().windowAnimations = R.style.clubcard_Dialog;
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
lp.copyFrom(dialog.getWindow().getAttributes());
lp.height = ViewGroup.LayoutParams.WRAP_CONTENT;
lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
dialog.getWindow().setAttributes(lp);
dialog.setContentView(view);
dialog.setCanceledOnTouchOutside(true);
dialog.setOnDismissListener(onDismissListener);
dialog.show();
return dialog;
}
i want in each version of android its should open smoothly without flickering or glitch .