Search code examples
androidandroid-custom-viewandroid-intent-chooser

Custom action chooser on a FAB button click


I'd like to display kind of custom chooser (similar to the share intent chooser) on a fab button click event.

The thing is that it should contain custom items with custom intent actions for each of the displayed items. I mean, instead of containing several items referencing intents that open other apps, I'd like to have a custom camera image item for opening the camera, a custom microphone image item for opening a micro recorder and the same for recording a video and importing files from internal memory. It would be something like the following picture from Google Drive:

Do you know how can I create this customised action chooser??


Solution

  • You can use for this Purpose Bottom Sheet.

    Here is the complete tutorial for Bottom Sheet. All three types are detailed discussed there according to your scenario. URL

    Here is the official doc please have to look at this.