Skip to content

Why is there no effect when I set the white balance? #1304

@iamroybill-prog

Description

@iamroybill-prog

I confirm that the following code is executable.:

private fun whiteBalance(cameraView: CameraView) {
ToastUtils.showShort("白平衡")
val tvWhiteBalance = mAdapter.getViewByPosition(0, R.id.tv_operate) as TextView
if (whiteBalanceIndex == 0) {
tvWhiteBalance.text = "自动"
cameraView.whiteBalance = WhiteBalance.AUTO //自动
} else if (whiteBalanceIndex == 1) {
tvWhiteBalance.text = "白炽灯"
cameraView.whiteBalance = WhiteBalance.INCANDESCENT //白炽灯
} else if (whiteBalanceIndex == 2) {
tvWhiteBalance.text = "荧光"
cameraView.whiteBalance = WhiteBalance.FLUORESCENT //荧光
} else if (whiteBalanceIndex == 3) {
tvWhiteBalance.text = "白光"
cameraView.whiteBalance = WhiteBalance.DAYLIGHT //白光
} else {
tvWhiteBalance.text = "混浊"
cameraView.whiteBalance = WhiteBalance.CLOUDY //混浊
}
if (whiteBalanceIndex == 4) {
whiteBalanceIndex = 0 //循环
} else {
whiteBalanceIndex++
}
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions