Date: 2020sep23
OS: Android
Q. Android: translucent dialog background
A.
In colors.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
...
<color name="colorSemiWhite">#A0FFFFFF</color>
<!-- This is AARRGGBB -->
</resources>
In your dialog:
@Override public void onCreate(Bundle icicle) {
super.onCreate(icicle);
...
getWindow().setBackgroundDrawable(
ContextCompat.getDrawable(main, R.color.colorSemiWhite));
// Optionally:
// Don't dim everything outside the dialog
getWindow().setDimAmount(0);
...
}