|
|
@ -43,6 +43,11 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
@BindView(R.id.cropModeRadioGroup) |
|
|
|
@BindView(R.id.cropModeRadioGroup) |
|
|
|
RadioGroup cropModeRadioGroup; |
|
|
|
RadioGroup cropModeRadioGroup; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Tap to Focus:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@BindView(R.id.tapToFocusModeRadioGroup) |
|
|
|
|
|
|
|
RadioGroup tapToFocusModeRadioGroup; |
|
|
|
|
|
|
|
|
|
|
|
// Width:
|
|
|
|
// Width:
|
|
|
|
|
|
|
|
|
|
|
|
@BindView(R.id.screenWidth) |
|
|
|
@BindView(R.id.screenWidth) |
|
|
@ -97,6 +102,7 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
|
|
|
|
|
|
|
|
captureModeRadioGroup.setOnCheckedChangeListener(captureModeChangedListener); |
|
|
|
captureModeRadioGroup.setOnCheckedChangeListener(captureModeChangedListener); |
|
|
|
cropModeRadioGroup.setOnCheckedChangeListener(cropModeChangedListener); |
|
|
|
cropModeRadioGroup.setOnCheckedChangeListener(cropModeChangedListener); |
|
|
|
|
|
|
|
tapToFocusModeRadioGroup.setOnCheckedChangeListener(tapToFocusModeChangedListener); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -199,6 +205,19 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RadioGroup.OnCheckedChangeListener tapToFocusModeChangedListener = new RadioGroup.OnCheckedChangeListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void onCheckedChanged(RadioGroup group, int checkedId) { |
|
|
|
|
|
|
|
camera.setTapToFocus( |
|
|
|
|
|
|
|
checkedId == R.id.modeTapToFocusVisible ? |
|
|
|
|
|
|
|
CameraKit.Constants.TAP_TO_FOCUS_VISIBLE : |
|
|
|
|
|
|
|
checkedId == R.id.modeTapToFocusInvisible ? |
|
|
|
|
|
|
|
CameraKit.Constants.TAP_TO_FOCUS_INVISIBLE : |
|
|
|
|
|
|
|
CameraKit.Constants.TAP_TO_FOCUS_OFF |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
@OnTextChanged(value = R.id.width, callback = OnTextChanged.Callback.AFTER_TEXT_CHANGED) |
|
|
|
@OnTextChanged(value = R.id.width, callback = OnTextChanged.Callback.AFTER_TEXT_CHANGED) |
|
|
|
void widthChanged() { |
|
|
|
void widthChanged() { |
|
|
|
if (String.valueOf(mCameraWidth).equals(width.getText().toString())) { |
|
|
|
if (String.valueOf(mCameraWidth).equals(width.getText().toString())) { |
|
|
|