`

How to set the brightness

 
阅读更多
android.provider.Settings.System.putInt(getContentResolver(),android.provider.Settings.System.SCREEN_BRIGHTNESS, brightness); // 0-255 
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = brightness / 255.0f;
getWindow().setAttributes(lp);

 另外需要延迟关闭应用,大概需要延迟几百毫秒吧~

分享到:
评论

相关推荐

    HX8347-D_DS_T__preliminary_v01_080624_Foxlink.pdf

    - **Gamma Characteristic Correction Function**: Adjusts the brightness and contrast of the display to improve image quality. - **Tearing Effect Output Line**: A feature to minimize screen tearing when...

    VB编程资源大全(英文控件)

    ImageLabel, ScrollPanel, SplitPanel, Brief<END><br>9,recordsetEng.zip This application shows how a DLLActiveX queries a Database and returns the recordset to the Standard EXE application.<END><br>...

    amcharts中文教程(柱状图,饼状图等的中文设置说明)

    默认为false[false] (true / false) if your chart's width or height is set in percents, and redraw is set to true, the chart will be redrawn then screen size changes --> <add_time_stamp></add_time_...

    Osprey SDK 帮助文件 视频采集卡

    - **Obtaining an Interface to the Custom Properties**:解释了如何获取定制属性接口以访问和设置采集卡的特定功能。 #### 输入选择 - **Input Select**:描述了如何选择视频输入源。 #### 视频标准 - **Video ...

    V4L2 API及数据结构

    /* How many buffers to allocate */ __u32 type; /* Buffer type */ __u32 memory; /* Memory type */ __u32 reserved; /* Reserved for future use */ }; ``` ##### 2. `struct v4l2_capability` 此结构体...

    gc2145_tinav2.1验证完成20170523_1648.7z

    = '#'){ //the sub cmd end by '#' while(buf[i] != 'x' && buf[i] != ':' && buf[i] != '#') { if((i+1) > buf_len) return 0; *((char*)cmd + n*lenght + j++) = buf[i++]; …… } R:\wyb\gc2145_tinav...

Global site tag (gtag.js) - Google Analytics