use of com.moro.mtweaks.views.recyclerview.SeekBarView in project MTweaks-KernelAdiutorMOD by morogoku.
the class ScreenFragment method backlightDimmerInit.
private void backlightDimmerInit(List<RecyclerViewItem> items) {
CardView backLightDimmerCard = new CardView(getActivity());
backLightDimmerCard.setTitle(getString(R.string.backlight_dimmer));
if (Misc.hasBackLightDimmerEnable()) {
SwitchView backLightDimmer = new SwitchView();
backLightDimmer.setSummary(getString(R.string.backlight_dimmer));
backLightDimmer.setChecked(Misc.isBackLightDimmerEnabled());
backLightDimmer.addOnSwitchListener(new SwitchView.OnSwitchListener() {
@Override
public void onChanged(SwitchView switchView, boolean isChecked) {
Misc.enableBackLightDimmer(isChecked, getActivity());
}
});
backLightDimmerCard.addItem(backLightDimmer);
}
if (Misc.hasMinBrightness()) {
SeekBarView minBrightness = new SeekBarView();
minBrightness.setTitle(getString(R.string.min_brightness));
minBrightness.setSummary(getString(R.string.min_brightness_summary));
minBrightness.setMax(Misc.getMaxMinBrightness());
minBrightness.setProgress(Misc.getCurMinBrightness());
minBrightness.setOnSeekBarListener(new SeekBarView.OnSeekBarListener() {
@Override
public void onStop(SeekBarView seekBarView, int position, String value) {
Misc.setMinBrightness(position, getActivity());
}
@Override
public void onMove(SeekBarView seekBarView, int position, String value) {
}
});
backLightDimmerCard.addItem(minBrightness);
}
if (Misc.hasBackLightDimmerThreshold()) {
SeekBarView threshold = new SeekBarView();
threshold.setTitle(getString(R.string.threshold));
threshold.setMax(50);
threshold.setProgress(Misc.getBackLightDimmerThreshold());
threshold.setOnSeekBarListener(new SeekBarView.OnSeekBarListener() {
@Override
public void onStop(SeekBarView seekBarView, int position, String value) {
Misc.setBackLightDimmerThreshold(position, getActivity());
}
@Override
public void onMove(SeekBarView seekBarView, int position, String value) {
}
});
backLightDimmerCard.addItem(threshold);
}
if (Misc.hasBackLightDimmerOffset()) {
SeekBarView dimmerOffset = new SeekBarView();
dimmerOffset.setTitle(getString(R.string.offset));
dimmerOffset.setMax(50);
dimmerOffset.setProgress(Misc.getBackLightDimmerOffset());
dimmerOffset.setOnSeekBarListener(new SeekBarView.OnSeekBarListener() {
@Override
public void onStop(SeekBarView seekBarView, int position, String value) {
Misc.setBackLightDimmerOffset(position, getActivity());
}
@Override
public void onMove(SeekBarView seekBarView, int position, String value) {
}
});
backLightDimmerCard.addItem(dimmerOffset);
}
if (backLightDimmerCard.size() > 0) {
items.add(backLightDimmerCard);
}
}
use of com.moro.mtweaks.views.recyclerview.SeekBarView in project MTweaks-KernelAdiutorMOD by morogoku.
the class SoundFragment method microphoneFlarInit.
private void microphoneFlarInit(List<RecyclerViewItem> items) {
SeekBarView microphoneFlar = new SeekBarView();
microphoneFlar.setTitle(getString(R.string.microphone_gain));
microphoneFlar.setItems(Sound.getMicrophoneFlarLimits());
microphoneFlar.setProgress(Sound.getMicrophoneFlarLimits().indexOf(Sound.getMicrophoneFlar()));
microphoneFlar.setOnSeekBarListener(new SeekBarView.OnSeekBarListener() {
@Override
public void onStop(SeekBarView seekBarView, int position, String value) {
Sound.setMicrophoneFlar(value, getActivity());
}
@Override
public void onMove(SeekBarView seekBarView, int position, String value) {
}
});
items.add(microphoneFlar);
}
use of com.moro.mtweaks.views.recyclerview.SeekBarView in project MTweaks-KernelAdiutorMOD by morogoku.
the class SoundFragment method camMicrophoneGainInit.
private void camMicrophoneGainInit(List<RecyclerViewItem> items) {
SeekBarView camMicrophoneGain = new SeekBarView();
camMicrophoneGain.setTitle(getString(R.string.cam_microphone_gain));
camMicrophoneGain.setItems(Sound.getCamMicrophoneGainLimits());
camMicrophoneGain.setProgress(Sound.getCamMicrophoneGainLimits().indexOf(Sound.getCamMicrophoneGain()));
camMicrophoneGain.setOnSeekBarListener(new SeekBarView.OnSeekBarListener() {
@Override
public void onStop(SeekBarView seekBarView, int position, String value) {
Sound.setCamMicrophoneGain(value, getActivity());
}
@Override
public void onMove(SeekBarView seekBarView, int position, String value) {
}
});
items.add(camMicrophoneGain);
}
use of com.moro.mtweaks.views.recyclerview.SeekBarView in project MTweaks-KernelAdiutorMOD by morogoku.
the class SoundFragment method headphonePowerAmpGainInit.
private void headphonePowerAmpGainInit(List<RecyclerViewItem> items) {
SeekBarView headphonePowerAmpGain = new SeekBarView();
headphonePowerAmpGain.setTitle(getString(R.string.headphone_poweramp_gain));
headphonePowerAmpGain.setItems(Sound.getHeadphonePowerAmpGainLimits());
headphonePowerAmpGain.setProgress(Sound.getHeadphonePowerAmpGainLimits().indexOf(Sound.getHeadphonePowerAmpGain()));
headphonePowerAmpGain.setOnSeekBarListener(new SeekBarView.OnSeekBarListener() {
@Override
public void onStop(SeekBarView seekBarView, int position, String value) {
Sound.setHeadphonePowerAmpGain(value, getActivity());
}
@Override
public void onMove(SeekBarView seekBarView, int position, String value) {
}
});
items.add(headphonePowerAmpGain);
}
use of com.moro.mtweaks.views.recyclerview.SeekBarView in project MTweaks-KernelAdiutorMOD by morogoku.
the class SoundFragment method headphoneTpaGainInit.
private void headphoneTpaGainInit(List<RecyclerViewItem> items) {
SeekBarView headphoneTpaGain = new SeekBarView();
headphoneTpaGain.setTitle(getString(R.string.headphone_tpa6165_gain));
headphoneTpaGain.setItems(Sound.getHeadphoneTpaGainLimits());
headphoneTpaGain.setProgress(Sound.getHeadphoneTpaGainLimits().indexOf(Sound.getHeadphoneTpaGain()));
headphoneTpaGain.setOnSeekBarListener(new SeekBarView.OnSeekBarListener() {
@Override
public void onStop(SeekBarView seekBarView, int position, String value) {
Sound.setHeadphoneTpaGain(value, getActivity());
}
@Override
public void onMove(SeekBarView seekBarView, int position, String value) {
}
});
items.add(headphoneTpaGain);
}
Aggregations