2

BottomSheetDialog prior to 23.2.0

Currently, I do use the ActionSend-Intent in several ways, to import images from the gallery or to share/send them. (see screenshots below).

I like the visual appearance and the functionality to drag the control up/down to cancel/dismiss the activity. And I think it is neither best practiseone nor can one customize this view by removing just anything from the list and adding new views.

Import from Gallery:

enter image description here

Export, open across apps via Chooser

enter image description here


With Android v23.2.0 the BottomSheetDialog component was introduced: https://developer.android.com/reference/android/support/design/widget/BottomSheetDialog.html

Unfortunately, I also want to support earlier versions, until version v19 (Android 4.4). Which means, I would have to look for an alternative to the BottomSheetDialog to present the context information modally.

The idea of this modal view is to simply visualize context information. The user cannot select something from the view, set a text or anything else. It's just the visualization of context information on demand. 3 bool values

Title
_______________________________________
"Value 1" valid    |
"Value 2" invalid  |  Overall: INVALID
"Value 3" valid    |

Currently, I implemented this functionality by using an AlertDialog, which loads the acoording axml into the Dialog via "setView". And I am fine with using the Layout.axml for this. Still, I would really like to have a fragment (or maybe even Activity) that behaves the same way as the described shareIntents above do. Not just a simple overlay (whether it is now displayed and positioned at the center, bottom or somewhere else) as described here: Changing position of the Dialog on screen android

Has anyone made experience with this? Also an idea how I could implement some kind of "switch" between android versions, to use from v23.2.0 on the "native" BottomSheetDialog and below the other, described approach?

Community
  • 1
  • 1
Lepidopteron
  • 6,056
  • 5
  • 41
  • 53

0 Answers0