Code example for ToggleButton

Methods: setVisibility

0
		send_photo.setVisibility(View.INVISIBLE);
		 
		take_photo.setOnClickListener(new View.OnClickListener() {
			@Override 
			public void onClick(View v) {
				flip_camera.setVisibility(View.INVISIBLE);
				take_photo.setVisibility(View.INVISIBLE);
				send_photo.setVisibility(View.VISIBLE);
				takePicture(); 
			} 
		}); 
		 
		send_photo.setOnClickListener(new View.OnClickListener() {
			@Override 
			public void onClick(View v) {
				User user = snapStackApplication.getUser();
				Snap snap = new Snap(user, null);
				snapStackApplication.setSnap(snap);
				//NEEDED: ADD BITMAP TO INTENT TO SEND IT TO CHOOSE USER ACTIVITY 
				 
				Intent intent = new Intent(SharePhotoActivity.this,