示例#1
0
  private void dt2sHeightInit() {
    List<String> list = new ArrayList<>();
    for (int i = 50; i < 2561; i++) list.add(i + getString(R.string.px));

    mDt2sHeightCard = new SeekBarCardView.DSeekBarCard(list);
    mDt2sHeightCard.setTitle(getString(R.string.dt2s_height));
    mDt2sHeightCard.setDescription(getString(R.string.dt2s_height_summary));
    mDt2sHeightCard.setProgress(Wake.getDt2sHeight());
    mDt2sHeightCard.setOnDSeekBarCardListener(this);

    addView(mDt2sHeightCard);
  }
示例#2
0
  private void wakeVibrationInit() {
    List<String> list = new ArrayList<>();
    list.add(getString(R.string.disabled));
    for (int i = 1; i < 91; i++) list.add(i + "%");

    mWakeVibrationCard = new SeekBarCardView.DSeekBarCard(list);
    mWakeVibrationCard.setTitle(getString(R.string.wake_vibration));
    mWakeVibrationCard.setDescription(getString(R.string.wake_vibration_summary));
    mWakeVibrationCard.setProgress(Wake.getWakeVibration());
    mWakeVibrationCard.setOnDSeekBarCardListener(this);

    addView(mWakeVibrationCard);
  }
示例#3
0
  private void wakeTimeoutInit() {
    List<String> list = new ArrayList<>();
    list.add(getString(R.string.disabled));
    for (int i = 1; i <= Wake.getWakeTimeoutMax(); i++) list.add(i + getString(R.string.min));

    mWakeTimeoutCard = new SeekBarCardView.DSeekBarCard(list);
    mWakeTimeoutCard.setTitle(getString(R.string.wake_timeout));
    mWakeTimeoutCard.setDescription(getString(R.string.wake_timeout_summary));
    mWakeTimeoutCard.setProgress(Wake.getWakeTimeout());
    mWakeTimeoutCard.setOnDSeekBarCardListener(this);

    addView(mWakeTimeoutCard);
  }