Intent i = new Intent(UpdateService.this,Lock.class); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); this.startActivity(i);
this.requestWindowFeature(Window.FEATURE_NO_TITLE); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); Don't call setContentView() before requestFeature().
public booleanonKeyDown(int keyCode,KeyEvent event){
switch(keyCode){
caseKeyEvent.KEYCODE_HOME:return true;
caseKeyEvent.KEYCODE_BACK:return true;
caseKeyEvent.KEYCODE_CALL:return true;
caseKeyEvent.KEYCODE_SYM: return true;
caseKeyEvent.KEYCODE_VOLUME_DOWN: return true;
caseKeyEvent.KEYCODE_VOLUME_UP: return true;
caseKeyEvent.KEYCODE_STAR: return true;
}
returnsuper.onKeyDown(keyCode, event);
}
public voidonAttachedToWindow() {
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
super.onAttachedToWindow();
}
if (code ==KeyEvent.KEYCODE_HOME) {
// If a system window has focus,then it doesn't make sense
// right now to interact withapplications.
WindowManager.LayoutParams attrs =win != null ? win.getAttrs() : null;
if (attrs != null) {
final int type = attrs.type;
if (type ==WindowManager.LayoutParams.TYPE_KEYGUARD
|| type ==WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG) {
// the "app" iskeyguard, so give it the key
return false;
}
final int typeCount =WINDOW_TYPES_WHERE_HOME_DOESNT_WORK.length;
for (int i=0; i<typeCount;i++) {
if (type ==WINDOW_TYPES_WHERE_HOME_DOESNT_WORK[i]) {
// don't do anything,but also don't pass it to the app
return true;
}
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有