Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Switch button click event to toggle flash on/off
- btnSwitch.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- if (isFlashOn) {
- // turn off flash
- turnOffFlash();
- } else {
- // turn on flash
- turnOnFlash();
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement