符合中小企业对网站设计、功能常规化式的企业展示型网站建设
本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...
商城网站建设因基本功能的需求不同费用上面也有很大的差别...
手机微信网站开发、微信官网、微信商城网站...
// 最大的屏幕亮度 private float maxLight; // 当前的亮度 private float currentLight; // 用来控制屏幕亮度 private Handler lightHandler; // 60秒时间不点击屏幕,屏幕变暗 private long delayTime = 60 * 1000L; protected void onCreate() { // 保持屏幕常亮 getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); // 屏幕亮度控制 lightHandler = new Handler(Looper.getMainLooper()); maxLight = getLightness(); } @Override public boolean dispatchTouchEvent(MotionEvent ev) { if (currentLight == 1) { startSleepTask(); return false; } startSleepTask(); return super.dispatchTouchEvent(ev); } /** * 获取亮度 */ private float getLightness() { WindowManager.LayoutParams localLayoutParams = this.getWindow().getAttributes(); return localLayoutParams.screenBrightness; } /** * 设置亮度 */ private void setLightness(int light) { currentLight = light; WindowManager.LayoutParams localLayoutParams = this.getWindow().getAttributes(); localLayoutParams.screenBrightness = (light / 255.0F); this.getWindow().setAttributes(localLayoutParams); } /** * 开启休眠任务 */ private void startSleepTask() { setLightness((int) maxLight); stopSleepTask(); lightHandler.postDelayed(sleepWindowTask, delayTime); } /** * 结束休眠任务 */ private void stopSleepTask() { lightHandler.removeCallbacks(sleepWindowTask); } /** * 休眠任务 */ Runnable sleepWindowTask = new Runnable() { @Override public void run() { setLightness(1); } };