Skip to content

5 Showing suitable applications for handling an Intent

Michael Rapp edited this page Dec 30, 2017 · 1 revision

Instead of manually adding items to a bottom sheet, it is also possible to show the applications, which are suited to handle a specific Intent. This causes the applications' titles to be shown together with their icons as the items of the bottom sheet. When one of the items is clicked by the user, the application is launched by passing the given Intent to it. In order to specify an Intent, the method setIntent(Activity, Intent):Builder of the class BottomSheet.Builder has to be used. If items have already been added, they will be removed by calling this method. The following screenshots illustrate the appearance of a bottom view, which displays possible receivers of an Intent, when either displaying the items as a list or as a grid: