title: Custom Gallery Image Picker
body: <p>I would like to allow the user to pock only one image that can be referenced via a uri, I've successfully done this through the following code: </p>
  
  <pre><code>private static final int PICK_IMAGE_REQUEST = 1;
  private Uri imageUri;
  
  // Choose file extended from BottomTabView, opens all images on device
  public static void openFileChooser(Context context) {
    Intent intent = new Intent();
    intent.setType("image/*");
    intent.setAction(Intent.ACTION_GET_CONTENT);
    ((Activity) context).startActivityForResult(intent, PICK_IMAGE_REQUEST);
  
    // Slide Animation
    ((Activity) context).overridePendingTransition(R.anim.slide_in_up, R.anim.nothing);
  
  }
  
  // TODO: Is it better to use bitmap or URI
  // Check if user has selected file and describe next step
  @Override
  protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
  
    if (requestCode == PICK_IMAGE_REQUEST &amp;&amp; resultCode == RESULT_OK &amp;&amp; data != null &amp;&amp; data.getData() != null) {
  
      // Retrieve image as a URI
      imageUri = data.getData();
  
      // Pass image URI to an intent and start activity
      Intent intent = new Intent(this, UploadImageActivity.class);
      intent.putExtra("imageUri", imageUri.toString());
      startActivity(intent);
  
      // Slide Animation
      overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);
      this.finish();
    }
  }
  </code></pre>
  
  <p>The above code opens the following: </p>
  
  <p><a href="https://i.stack.imgur.com/1DCj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1DCj.jpg" alt="General Gallery"></a></p>
  
  <p>However, I would like to have something like the following: </p>
  
  <p><a href="https://i.stack.imgur.com/VdMj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VdMj.jpg" alt="Custom Gallery"></a></p>
  
  <p><strong>Question:</strong> How can I achieve something more like the "Custom Gallery"? </p>