rename the photo video toggling functions
This commit is contained in:
parent
fa9eb58012
commit
e44e1ccdbf
|
@ -323,20 +323,20 @@ class MainActivity : SimpleActivity(), SensorEventListener, PreviewListener, Pho
|
||||||
|
|
||||||
private fun checkButtons() {
|
private fun checkButtons() {
|
||||||
if (mIsInPhotoMode) {
|
if (mIsInPhotoMode) {
|
||||||
initPhotoButtons()
|
initPhotoMode()
|
||||||
} else {
|
} else {
|
||||||
tryInitVideoButtons()
|
tryInitVideoMode()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initPhotoButtons() {
|
private fun initPhotoMode() {
|
||||||
toggle_photo_video.setImageDrawable(mRes.getDrawable(R.drawable.ic_video))
|
toggle_photo_video.setImageDrawable(mRes.getDrawable(R.drawable.ic_video))
|
||||||
shutter.setImageDrawable(mRes.getDrawable(R.drawable.ic_shutter))
|
shutter.setImageDrawable(mRes.getDrawable(R.drawable.ic_shutter))
|
||||||
mPreview?.initPhotoMode()
|
mPreview?.initPhotoMode()
|
||||||
setupPreviewImage(true)
|
setupPreviewImage(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun tryInitVideoButtons() {
|
private fun tryInitVideoMode() {
|
||||||
if (mPreview?.initRecorder() == true) {
|
if (mPreview?.initRecorder() == true) {
|
||||||
initVideoButtons()
|
initVideoButtons()
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue