BottomSheetDialog in Android before v23.2.0

BottomSheetDialog before 23.2.0

I am currently using ActionSend-Intent in several ways to import or share / send images from gallery. (see screenshots below).

I like the look and functionality to drag the control up / down to undo / reject the action. And I think this is not the best practice and you cannot customize this view by removing anything from the list and adding new views.

Import from gallery:

enter image description here

Export, open through apps with Chooser

enter image description here


BottomSheetDialog component was added in Android v23.2.0: https://developer.android.com/reference/android/support/design/widget/BottomSheetDialog.html

Unfortunately, I also want to support earlier versions up to v19 (Android 4.4). This means I will have to look for an alternative to BottomSheetDialog in order to present the context information modally.

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

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

      

Currently I have implemented this functionality using AlertDialog which loads acomording axml into Dialog via "setView". And I'm fine using Layout.axml for this. However, I would really like to have a Fragment (or perhaps even an Activity) that behaves in the same way as the shareIntents described above. Not just a simple overlay (it is now displayed and positioned in the center, bottom, or somewhere else) as described here: Changing the position of a dialog box on the Android screen

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

+3


source to share





All Articles