Example usage for android.util Range getLower

List of usage examples for android.util Range getLower

Introduction

In this page you can find the example usage for android.util Range getLower.

Prototype

public T getLower() 

Source Link

Document

Get the lower endpoint.

Usage

From source file:com.android.camera2.its.ItsSerializer.java

@SuppressWarnings("unchecked")
private static Object serializeRange(Range range) throws org.json.JSONException {
    JSONArray rangeObj = new JSONArray();
    rangeObj.put(range.getLower());
    rangeObj.put(range.getUpper());/*from  ww w .ja  v  a  2 s  .  c o  m*/
    return rangeObj;
}

From source file:com.example.android.camera2basic.Camera2BasicFragment.java

@Override
public void onStopTrackingTouch(SeekBar seekBar) {
    switch (seekBar.getId()) {
    case R.id.iso: {
        Range<Integer> range = mCameraCharacteristics.get(CameraCharacteristics.SENSOR_INFO_SENSITIVITY_RANGE);
        int max = range.getUpper();
        int min = range.getLower();
        isoValue = ((seekBar.getProgress() * (max - min)) / 100 + min);
        createCameraPreviewSession_ISO();
        break;//w ww  . j  a  v a 2 s .c  o  m
    }
    case R.id.focus: {
        float distance = mCameraCharacteristics.get(CameraCharacteristics.LENS_INFO_MINIMUM_FOCUS_DISTANCE);
        focusValue = seekBar.getProgress() * distance / 100;
        createCameraPreviewSession_FOCUS();
        break;
    }
    default:
        break;
    }

}