1

I have been looking into one of the Instagram app functionality when user tap on the image icon in the EditText (framed in a red box in the image below)

enter image description here

After the click, the gallery view appears from underneath the EditText, pushes the current layout upward to give room gallery images.

enter image description here

SUGGESTIONS: So far, options that I thought about were:
Custom softkeyboard with empty view instead of keyboard.
Customized input method.
Layout animations.
Fragment.
QUESTION: How did Instagram implement this feature? I'm not sure which option is best for this functionality. Also, if there are other ways to achieve the following and I did not mention, please feel free to do.

Red M
  • 2,609
  • 3
  • 30
  • 50
  • We don't know how instagram implemented it, as the code isn't public (those of us who do know are under NDA). But it isn't going to be a custom keyboard. Odds are its a simple view (or fragment) set to VISIBILITY.GONE by default, then set to VISIBLE when needed and an animation for the slideup. – Gabe Sechan May 29 '17 at 17:48
  • isn't this a bottom sheet? – headshoT May 29 '17 at 17:51
  • @GabeSechan I played with fragments and animations before opening this thread, the most that I got to was a sliding fragment from bottom to top, but that fragment view ended up overlapping the layout and not pushing it upward. – Red M May 29 '17 at 17:59

1 Answers1

1

there is library available for this, you can get it here --

https://github.com/ParkSangGwon/TedBottomPicker?utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=4320

headshoT
  • 348
  • 3
  • 14
  • you can get some guidance from this, hope this helps – headshoT May 29 '17 at 17:50
  • From taking a quick looking into bottom sheet, it looks like it's a good start for how to populate the view with gallery images. However, from what I'm seeing in the demo, bottom sheet is not pushing the layout upward, but it's overlapping the current layout. – Red M May 29 '17 at 17:56
  • check this:-- https://stackoverflow.com/questions/42264588/replicate-keyboard-like-layout-upward-push-in-bottom-sheet/42293582 – headshoT May 29 '17 at 18:00
  • I tried the link that you provided, but my layout is not getting pushed upward. Also, I looked into the BottomSheetBehiavor, apparently that class does not have a state where this could be doable. So the only workaround has to be a combination that I did not figure yet. The answer might be in the link you provided, but I'm not able to accomplish that result so far. – Red M Jun 02 '17 at 20:30