Skip to content

Commit

Permalink
Use alpha layer instead of window flag for dimming.
Browse files Browse the repository at this point in the history
  • Loading branch information
skykelsey committed Oct 17, 2014
1 parent 7b1557d commit a4574de
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.Gravity;
import android.view.ViewGroup;
Expand All @@ -30,9 +29,7 @@ public ApptentiveBaseDialog(final Context context, int layout) {
params.width = ViewGroup.LayoutParams.FILL_PARENT;
params.height = ViewGroup.LayoutParams.FILL_PARENT;
params.gravity = Gravity.CENTER;
params.dimAmount = 0.5f;
getWindow().setAttributes(params);
getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
getWindow().setBackgroundDrawable(new ColorDrawable(0x7F000000));
}
}

0 comments on commit a4574de

Please sign in to comment.