0

I've created a Dialog that appears when a button is clicked. I made a custom layout for it and coded it like this:

final Dialog dialog = new Dialog (CheckpointsActivity.this, android.R.style.Theme_Translucent);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.alert_continue);
//rest of the code...

This is how the Dialog looks now: enter image description here

And this is how I want it to look like:

enter image description here

It should be a lot darker in the background with a gradient effect. I can't seem to find any info on how to achieve this.

Guy
  • 6,414
  • 19
  • 66
  • 136
  • Have you tried creating your own theme by inheriting android.R.style.Theme_Translucent and changing the values as appropriate for the design you are looking for and using that theme instead of the provided theme? – tim.paetz Nov 18 '13 at 17:26
  • One way to achieve this is to use a FrameLayout and add a PopupWindow to it. It is explained [here](http://stackoverflow.com/a/10725022/1235555) – user1235555 Nov 18 '13 at 17:58

1 Answers1

0

You can make a dialog box with the same background and gradient and then make the ui on top of that.

muditagarwal88
  • 548
  • 5
  • 13