add icons

This commit is contained in:
tibbi
2016-06-02 15:06:50 +02:00
parent 2c16e1ccef
commit ddf942062f
28 changed files with 14 additions and 10 deletions

View File

@ -17,7 +17,7 @@ import butterknife.OnClick;
public class MainActivity extends AppCompatActivity {
@BindView(R.id.viewHolder) RelativeLayout viewHolder;
@BindView(R.id.toggle_camera) View toggleCameraBtn;
@BindView(R.id.toggle_camera) ImageView toggleCameraBtn;
@BindView(R.id.toggle_flash) ImageView toggleFlashBtn;
private Preview preview;
@ -42,8 +42,10 @@ public class MainActivity extends AppCompatActivity {
public void toggleCamera() {
if (currCamera == Camera.CameraInfo.CAMERA_FACING_BACK) {
currCamera = Camera.CameraInfo.CAMERA_FACING_FRONT;
toggleCameraBtn.setImageResource(R.mipmap.camera_rear);
} else {
currCamera = Camera.CameraInfo.CAMERA_FACING_BACK;
toggleCameraBtn.setImageResource(R.mipmap.camera_front);
}
disableFlash();