title: Errors with taking photos and setting it in imageview with Fragments
body: <p>I cannot seem to be able to take an photo with the camera and then set it into the imageview. I have tried many different ways but I either receive errors or the image view wont display the photo that I took. I'll post what I have coded at the moment</p>
  
  <pre><code> @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      View view = inflater.inflate(R.layout.fragment_snap, container, false);
  
      ImageView imageview = (ImageView) view.findViewById(R.id.camera_display);
      Button camera_btn = (Button) view.findViewById(R.id.camera_btn);
  
  
      camera_btn.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
  
              getActivity().startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);
              }
  
      });
  
      return view;
  }
  </code></pre>
  
  <p>Then for the onActivityResult</p>
  
  <pre><code>   @Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
      if (requestCode == CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE &amp;&amp; resultCode == getActivity().RESULT_OK) {
          Bundle extras = data.getExtras();
          Bitmap imageBitmap = (Bitmap) extras.get("data");
  
          imageview.setImageBitmap(imageBitmap);
      }
  }
  </code></pre>
  
  <p><strong>EDIT</strong>
  I am now getting this error</p>
  
  <pre><code>04-29 19:34:14.946  32713-32713/com.example.tim.cryptpix_10 W/Bundle﹕ Key output expected Parcelable but value was a java.lang.Integer.  The default value &lt;null&gt; was returned.
  </code></pre>