title: Is there a proper way to change the image loaded to the imageview of an inflated view?
body: <p>I have a layout with some buttons loaded in it. Each button represents an exhibit. Clicking on a exhibit, an alertbox with an inflated view is created which contains some fields from my database, including the name of an image which then is used to be loaded with Picasso using a url. On that inflated view I have an edit button which lets me edit the fields and save them on the database. The problem is that I cannot change and then save the new image to my database. </p>
  
  <p>I have tried to use 2 libraries I had found
   <a href="https://github.com/esafirm/android-image-picker" rel="nofollow noreferrer">https://github.com/esafirm/android-image-picker</a>
  <a href="https://github.com/jrvansuita/PickImage" rel="nofollow noreferrer">https://github.com/jrvansuita/PickImage</a></p>
  
  <p>While both seem to get me to pick the image, the image is never loaded/saved.</p>
  
  <p>I have also tried to post my issue to both the above, but I had no response back. I don't think there is need for code, as it is just an inflated view within an alertbox with an imageview and 3 textviews.</p>
  
  <p>Can someone give me some help?
  Thank you</p>
  
  <p>EDIT: Added code on request. Only have the imagepicker library code. PickImage tries to load image either with Bitmap or URI.</p>
  
  <pre><code>private void exhibitalertbox(int ii){
    //Initializes the data to be shown. setText to the 3 Textviews 
  Picasso.get().load("mysite/uploads/"+exhibits[ii][4]).into(exhibitphoto);
  editbtn.setOnClickListener(new View.OnClickListener(){
          @Override
          public void onClick(View v){
  exhibitphoto.isClickable();
              exhibitphoto.setOnClickListener(new View.OnClickListener(){
                  @Override
                  public void onClick(View v){
  
                      ImagePicker.create(MuseumActivity.this)
  
                              .start();
  
                  }
              });
  }
  </code></pre>
  
  <p>Then the below is what i use when i try to change the image</p>
  
  <pre><code>  @Override
  protected void onActivityResult(int requestCode, final int resultCode, Intent data) {
      if (ImagePicker.shouldHandle(requestCode, resultCode, data)) {
          // Get a list of picked images
          //List&lt;Image&gt; images = ImagePicker.getImages(data);
          // or get a single image only
  
          Image image = ImagePicker.getFirstImageOrNull(data);
  
          //ImageView exhibitphoto=vi.findViewById(R.id.exhibitphoto);
          Log.e("image",""+image.getPath());
  
  
          return;
      }
      super.onActivityResult(requestCode, resultCode, data);
  
  }
  </code></pre>
  
  <p>As of now the image variable returns data but it doesn't seem to 'add' it to the image view. I tried to 'target' the imageview and add to it, trying to pick the image from the image.getPath() but with no success. . And i still have to save the image to the database on top of that.  </p>