Java Code Examples for android.view.WindowManager.LayoutParams#BRIGHTNESS_OVERRIDE_NONE
The following examples show how to use
android.view.WindowManager.LayoutParams#BRIGHTNESS_OVERRIDE_NONE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PopupDialog.java From Noyze with Apache License 2.0 | 6 votes |
private static WindowManager.LayoutParams getWindowLayoutParams() { int flags = (LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | LayoutParams.FLAG_DIM_BEHIND ); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) flags |= LayoutParams.FLAG_HARDWARE_ACCELERATED; if (!BuildConfig.DEBUG) flags |= LayoutParams.FLAG_SECURE; LayoutParams WPARAMS = new WindowManager.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, LayoutParams.TYPE_SYSTEM_ALERT, flags, PixelFormat.TRANSLUCENT); final int windowAnimations = getInternalStyle("Animation_Dialog"); if (windowAnimations > 0) WPARAMS.windowAnimations = windowAnimations; WPARAMS.dimAmount = 0.6f; WPARAMS.packageName = PopupDialog.class.getPackage().getName(); WPARAMS.setTitle(TAG); WPARAMS.gravity = Gravity.CENTER; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) WPARAMS.screenBrightness = WPARAMS.buttonBrightness = LayoutParams.BRIGHTNESS_OVERRIDE_NONE; return WPARAMS; }
Example 2
Source File: StatusBarVolumePanel.java From Noyze with Apache License 2.0 | 6 votes |
@Override public WindowManager.LayoutParams getWindowLayoutParams() { int flags = (LayoutParams.FLAG_NOT_FOCUSABLE | LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | LayoutParams.FLAG_NOT_TOUCH_MODAL | LayoutParams.FLAG_LAYOUT_INSET_DECOR | LayoutParams.FLAG_LAYOUT_IN_SCREEN | LayoutParams.FLAG_SHOW_WHEN_LOCKED ); LayoutParams WPARAMS = new WindowManager.LayoutParams( LayoutParams.MATCH_PARENT, mStatusBarHeight, 0, 0, LayoutParams.TYPE_SYSTEM_ERROR, flags, PixelFormat.TRANSLUCENT); WPARAMS.windowAnimations = android.R.style.Animation_Dialog; WPARAMS.packageName = getContext().getPackageName(); WPARAMS.setTitle(TAG); WPARAMS.rotationAnimation = LayoutParams.ROTATION_ANIMATION_JUMPCUT; WPARAMS.gravity = (Gravity.FILL_HORIZONTAL | Gravity.TOP); WPARAMS.screenBrightness = WPARAMS.buttonBrightness = LayoutParams.BRIGHTNESS_OVERRIDE_NONE; return WPARAMS; }
Example 3
Source File: PopupDialog.java From Noyze with Apache License 2.0 | 6 votes |
private static WindowManager.LayoutParams getWindowLayoutParams() { int flags = (LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | LayoutParams.FLAG_DIM_BEHIND ); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) flags |= LayoutParams.FLAG_HARDWARE_ACCELERATED; if (!BuildConfig.DEBUG) flags |= LayoutParams.FLAG_SECURE; LayoutParams WPARAMS = new WindowManager.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, LayoutParams.TYPE_SYSTEM_ALERT, flags, PixelFormat.TRANSLUCENT); final int windowAnimations = getInternalStyle("Animation_Dialog"); if (windowAnimations > 0) WPARAMS.windowAnimations = windowAnimations; WPARAMS.dimAmount = 0.6f; WPARAMS.packageName = PopupDialog.class.getPackage().getName(); WPARAMS.setTitle(TAG); WPARAMS.gravity = Gravity.CENTER; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) WPARAMS.screenBrightness = WPARAMS.buttonBrightness = LayoutParams.BRIGHTNESS_OVERRIDE_NONE; return WPARAMS; }
Example 4
Source File: StatusBarVolumePanel.java From Noyze with Apache License 2.0 | 6 votes |
@Override public WindowManager.LayoutParams getWindowLayoutParams() { int flags = (LayoutParams.FLAG_NOT_FOCUSABLE | LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | LayoutParams.FLAG_NOT_TOUCH_MODAL | LayoutParams.FLAG_LAYOUT_INSET_DECOR | LayoutParams.FLAG_LAYOUT_IN_SCREEN | LayoutParams.FLAG_SHOW_WHEN_LOCKED ); LayoutParams WPARAMS = new WindowManager.LayoutParams( LayoutParams.MATCH_PARENT, mStatusBarHeight, 0, 0, LayoutParams.TYPE_SYSTEM_ERROR, flags, PixelFormat.TRANSLUCENT); WPARAMS.windowAnimations = android.R.style.Animation_Dialog; WPARAMS.packageName = getContext().getPackageName(); WPARAMS.setTitle(TAG); WPARAMS.rotationAnimation = LayoutParams.ROTATION_ANIMATION_JUMPCUT; WPARAMS.gravity = (Gravity.FILL_HORIZONTAL | Gravity.TOP); WPARAMS.screenBrightness = WPARAMS.buttonBrightness = LayoutParams.BRIGHTNESS_OVERRIDE_NONE; return WPARAMS; }
Example 5
Source File: RemindFrDialog.java From AssistantBySDK with Apache License 2.0 | 5 votes |
@Override public boolean dispatchTouchEvent(MotionEvent ev) { if (context.getWindow().getAttributes().screenBrightness == 0.01f) { LayoutParams params = context.getWindow().getAttributes(); params.screenBrightness = LayoutParams.BRIGHTNESS_OVERRIDE_NONE; context.getWindow().setAttributes(params); } return super.dispatchTouchEvent(ev); }
Example 6
Source File: RemindEditAheadDialog.java From AssistantBySDK with Apache License 2.0 | 5 votes |
@Override public boolean dispatchTouchEvent(MotionEvent ev) { if(context.getWindow().getAttributes().screenBrightness==0.01f){ LayoutParams params=context.getWindow().getAttributes(); params.screenBrightness= LayoutParams.BRIGHTNESS_OVERRIDE_NONE; context.getWindow().setAttributes(params); } return super.dispatchTouchEvent(ev); }
Example 7
Source File: RemindEditDialog.java From AssistantBySDK with Apache License 2.0 | 5 votes |
@Override public boolean dispatchTouchEvent(MotionEvent ev) { if(mContext.getWindow().getAttributes().screenBrightness==0.01f){ LayoutParams params=mContext.getWindow().getAttributes(); params.screenBrightness= LayoutParams.BRIGHTNESS_OVERRIDE_NONE; mContext.getWindow().setAttributes(params); } return super.dispatchTouchEvent(ev); }
Example 8
Source File: TimePickerDialog.java From AssistantBySDK with Apache License 2.0 | 5 votes |
@Override public boolean dispatchTouchEvent(MotionEvent ev) { if(context.getWindow().getAttributes().screenBrightness==0.01f){ LayoutParams params=context.getWindow().getAttributes(); params.screenBrightness= LayoutParams.BRIGHTNESS_OVERRIDE_NONE; context.getWindow().setAttributes(params); } return super.dispatchTouchEvent(ev); }
Example 9
Source File: DatePickerDialog.java From AssistantBySDK with Apache License 2.0 | 5 votes |
@Override public boolean dispatchTouchEvent(MotionEvent ev) { if(context.getWindow().getAttributes().screenBrightness==0.01f){ LayoutParams params=context.getWindow().getAttributes(); params.screenBrightness= LayoutParams.BRIGHTNESS_OVERRIDE_NONE; context.getWindow().setAttributes(params); } return super.dispatchTouchEvent(ev); }
Example 10
Source File: AlarmFrDialog.java From AssistantBySDK with Apache License 2.0 | 5 votes |
@Override public boolean dispatchTouchEvent(MotionEvent ev) { if (context.getWindow().getAttributes().screenBrightness == 0.01f) { LayoutParams params = context.getWindow().getAttributes(); params.screenBrightness = LayoutParams.BRIGHTNESS_OVERRIDE_NONE; context.getWindow().setAttributes(params); } return super.dispatchTouchEvent(ev); }
Example 11
Source File: AlarmEditDialog.java From AssistantBySDK with Apache License 2.0 | 5 votes |
@Override public boolean dispatchTouchEvent(MotionEvent ev) { if(mContext.getWindow().getAttributes().screenBrightness==0.01f){ LayoutParams params=mContext.getWindow().getAttributes(); params.screenBrightness= LayoutParams.BRIGHTNESS_OVERRIDE_NONE; mContext.getWindow().setAttributes(params); } return super.dispatchTouchEvent(ev); }
Example 12
Source File: CaculatorDialog.java From AssistantBySDK with Apache License 2.0 | 5 votes |
@Override public boolean dispatchTouchEvent(MotionEvent ev) { if (context.getWindow().getAttributes().screenBrightness == 0.01f) { LayoutParams params = context.getWindow().getAttributes(); params.screenBrightness = LayoutParams.BRIGHTNESS_OVERRIDE_NONE; context.getWindow().setAttributes(params); } return super.dispatchTouchEvent(ev); }