Advertisement
ms_olin

Untitled

May 7th, 2017
1,876
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. // Switch button click event to toggle flash on/off
  2.         btnSwitch.setOnClickListener(new View.OnClickListener() {
  3.  
  4.             @Override
  5.             public void onClick(View v) {
  6.                 if (isFlashOn) {
  7.                     // turn off flash
  8.                     turnOffFlash();
  9.                 } else {
  10.                     // turn on flash
  11.                     turnOnFlash();
  12.                 }
  13.             }
  14.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement