How to multiple Layout on one screen in android?

491 viewsandroid gridview listview
harsh s | 28 xp

I want to make Grid, List view and Other views on screen, please let me know how to do so. I can make these view separately but when i combine all these views together don’t work.



Thank you

Lakshmi Priya | 125 xp
Best Answer harsh s commented on answer

If you want to load listview and gridview together in your activity you can just make using LayoutManger itself no need to create differnet view to show gridview and listview in your activity here am posting the answer please check it :

gridview :(if you are using recyclerview)


recyclerview.setLayoutManager(new GridLayoutMnager(getActivity(),2) //2 refers two coloumns



recyclerview.setLinearLayoutManager(new LinearLayoutManager(getActivty());

Pinkal Mistry | 44 xp

Hello Harsh,


I think if you use include layout like,

<include layout=”@layout/layoutGrid”/>

and the main thing for al grid and all layout make sure you layout height is wrap_content,


Sindhuja K | 206 xp

I think this can be achieved by setting the ‘visibility’ flag associated with each UI element. To develop an application with multiple screens in one activity, each screen must be defined using a layout container.