2
I’ve been trying for a few days to reach a transparent Progress dialog with an opaque white background equal to the images below but only get to black background opaque in the android pattern I’ve seen some apps that managed to do so someone already got ? if you could help me how ? I thank you from now on for the help of all.
public static Dialog showDialogLoading(Context context, String msg) {
Dialog dialog = new Dialog(context, R.style.AppThemeLoading);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.progress_dialog);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(ContextCompat.getColor(context, R.color.corBranco_dialog)));
dialog.show();
return dialog;
}
<style name="AppThemeLoading" parent="Base.ThemeOverlay.AppCompat">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
</style>
<color name="corBranco_dialog">#80ffffff</color>
To do this you will have to set the color Alpha
– Dev
Post your code so we can see how you’re doing
– rbz
@Raonibz edited the question adding the code can give a help now, I’m still learning to use stackoverflow
– afnascimento
Try it this way:
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.R.color.transparent));
If it works, then you create a reference color, and change only(android.R.color.suacor)
.– rbz