//状态栏 调节亮度框
frameworks/base/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
public QSPanel(Context context, AttributeSet attrs) {
mBrightnessController = new BrightnessController(getContext(),
(ImageView) findViewById(R.id.brightness_icon),
(ToggleSlider) findViewById(R.id.brightness_slider),
(CheckBox) findViewById(R.id.brightness_auto));
}
//设置界面 调节亮度框
frameworks\base\packages\SystemUI\src\com\android\systemui\settings\BrightnessDialog.java
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.quick_settings_brightness_dialog);
final ImageView icon = (ImageView) findViewById(R.id.brightness_icon);
final ToggleSlider slider = (ToggleSlider) findViewById(R.id.brightness_slider);
mBrightnessController = new BrightnessController(this, icon, slider);
}
//亮度 控制调节
frameworks\base\packages\SystemUI\src\com\android\systemui\settings\BrightnessController.java
public void onChanged(ToggleSlider view, boolean tracking, boolean automatic, int value,
boolean stopTracking) {}
//亮度框 滑动条
frameworks\base\packages\SystemUI\src\com\android\systemui\settings\ToggleSlider.java
private final OnSeekBarChangeListener mSeekListener = new OnSeekBarChangeListener() {
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
mListener.onChanged(ToggleSlider.this, mTracking, mToggle.isChecked(),mSlider.getProgress(), true);
}
public void onStartTrackingTouch(SeekBar seekBar) {mListener.onChanged()}
public void onStopTrackingTouch(SeekBar seekBar) {mListener.onChanged()}
frameworks\base\packages\SystemUI\src\com\android\systemui\settings\ToggleSeekBar.java