Hi everyone! I’m having some issues figuring out h...
# android
a
Hi everyone! I’m having some issues figuring out how to use a
Fragment
implementation both in the “normal” way (embedding it in an activity for instance) and also be able to display it as a modal. I know it’s pretty easy with a
DialogFragment
implementation to display it as a modal, but I wanted to know if it’s possible to also display a
Fragment
as a modal, or maybe wrap it in a
DialogFragment
?
✔️ 1
i
DialogFragments can be added directly to a layout: https://developer.android.com/guide/topics/ui/dialogs#FullscreenDialog
a
So you’d say everything should be a DialogFragment ?
d
You can have a Dialog Fragment with full Width and Height
a
I think I'll go with that and use a DialogFragment in both cases, thanks for the help!
c
Was searching through here to see if anyone had any tips on getting a DialogFragment to actually have width wrap content. @Ian Lake do you know if that's possible? My custom dialogFragment doesn't seem to expand to fit all of the text in my textView.