Stretchable dialog from Android
Sep 1, 2018 · 1 min read
Often I need to create a dialog with transparent back without fixed size. It can be some text, image with unknown ratio, list of something. I can calculate the height, but Constraint Layout can to do it automatically. Small example:

That’s all! I can attach to dialog_container some content, such as ScrollView(from fixed content), RecyclerView.
My window will shrink to size of content size, or limit size of the window size.

Github demo: https://github.com/d-aleksandrov/Stretchable-Dialog-Android
