Transparent Alert Dialog Box

I have little doubt about the transparent AlertDialog window in android. I created an alert dialog using AlertDialog.builder on the surface of the camera, but I want the Transparent alert dialog to be possible. Please help me

Relations Raj

+1
android
Nov 04 2018-11-11T00:
source share
2 answers

Use this
The code is as follows

Dialog mDialog = new Dialog(mContext, android.R.style.Theme_Translucent_NoTitleBar_Fullscreen); 

Answer taken from a similar answer here

+14
Nov 04 '11 at 2:59 p.m.
source share

Yes it is possible. I believe that you can do this by creating a custom alert dialog:

http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog

you can then set the background of your custom dialog box like this:

 this.getWindow().setBackgroundDrawableResource(R.drawable.transparent); 

(where "R.drawable.transparent" is a reference to the color "# 00000000")

+8
Nov 04 2018-11-11T00:
source share



All Articles