Antonely93
Antonely93

Reputation: 23

Put Imageviews side by side android studio

i want to create a layout like in this picture, See it my goal

so for that i did with LinearLayout but i have this for result:

See it

so please how i need your help to reach my goal,

Upvotes: 1

Views: 52

Answers (3)

Parth Lotia
Parth Lotia

Reputation: 803

Use Staggered GridView for your layout..It will solve your problem.

  • StaggeredGridView is like GridView but in GridView you can show data in Same size boxes , where in StraggeredGridView you can show data in different size of boxes , like you give image in your question .

    1. LinearLayoutManager: It is used for displaying Vertical or Horizontal List.
    2. GridLayoutManager: It is used for displaying the items in the form of Grids.
    3. StaggeredGridLayoutManager: It is used to show the items in staggered Grid.

Here is the example of staggered-grid

Upvotes: 0

Bhavik Parmar
Bhavik Parmar

Reputation: 54

The layout you showed in the picture is called staggered gridview and for implementing that you can find an example here.

Upvotes: 0

Tejas Pandya
Tejas Pandya

Reputation: 4087

You can't achieve that with LinearLayout.

you need to use StaggeredGridView to achieve that result.

For demo You can use this

Upvotes: 1

Related Questions