Java tutorial
//package com.java2s; import android.app.Activity; import android.view.WindowManager; public class Main { public static void changeScreen(Activity ctx, float f) { WindowManager.LayoutParams lp = ctx.getWindow().getAttributes(); lp.alpha = f; lp.dimAmount = f; ctx.getWindow().setAttributes(lp); } }