Is it possible to create this kind of custom view in android?

enter image description here

I'm just wondering if I can create a similar layout in android.

The user view should expand depending on the nature of the image. I tried using GridView to make this look.

If someone worked with a similar look, let me know. Thanks in advance...

+8
android android-layout view
source share
2 answers

You should look here for the StaggeredGridView here , as it does something similar, although not quite what you are looking for. You can find a demo project here if you want to quickly see how it works.

+5
source share

This is not possible with gridview. You will need to create a ViewGroup and have to inflate scroll views. And when you add any view to the viewing group, the view will contain an image, a caption, etc. And the main bank is that you will need to set the width of this view to 1/4 of the width of the ViewGroup, and the width of the image in this view is match_parent, and the height of the view and image should be equal to wrap_content.

Try it once with ViewGroup and inflater and you will find your way. Hope this helps.

0
source share

All Articles