0

I want to add GridView inside ExpandableListView in android. I found one tutorial of a GridView inside ExpandableListView but this does not provide the insertion/addition of GridView in ExpandableListView.

Here is the link: GridView inside Expandable list in android Tutorial in this link covers the problem after one is successful in inserting GridView in ExpandableListView. But my problem is to get such a layout first. Which is not given in this link. I also did not find anywhere that how to add GridView in ExpandableListView?

actually I want to create this kinda view:


#########ExpandableListView############
>>>>>>>>>>>>GridView>>>>>>>>>>>>>>>
    #Column1##Column2##Column3
    #Item  1##Item  2##Item  3 
    #Item  1##Item  2##Item  3
    #Item  1##Item  2##Item  3
    #Item  1##Item  2##Item  3
>>>>>>>>>>>>GridView>>>>>>>>>>>>>>>
    #Column1##Column2##Column3
    #Item  1##Item  2##Item  3 
    #Item  1##Item  2##Item  3
    #Item  1##Item  2##Item  3
    #Item  1##Item  2##Item  3
>>>>>>>>>>>>GridView>>>>>>>>>>>>>>>
    #Column1##Column2##Column3
    #Item  1##Item  2##Item  3 
    #Item  1##Item  2##Item  3
    #Item  1##Item  2##Item  3
    #Item  1##Item  2##Item  3
>>>>>>>>>>>>GridView>>>>>>>>>>>>>>>
    #Column1##Column2##Column3
    #Item  1##Item  2##Item  3 
    #Item  1##Item  2##Item  3
    #Item  1##Item  2##Item  3
    #Item  1##Item  2##Item  3
Community
  • 1
  • 1
Master
  • 2,945
  • 5
  • 34
  • 65
  • I got the answer. Simply create ListView which will be having LinearLayout as its child items. And each child LinearLayout will be holding other Android layout items like ImageView, ImgaeButton, TextView, Button, etc. >>>>>ListView>>>>> >>>>LinearLayout>>> >>>>ChildItem1::ChildItem2::ChildItem3..and so on. – Master Aug 06 '13 at 16:57

1 Answers1

0

I got the answer. Simply create ListView which will be having LinearLayout as its child items. And each child LinearLayout will be holding other Android layout items like ImageView, ImgaeButton, TextView, Button, etc.

<ListView>
   <LinearLayout>
      <ChildItem1>
      <ChildItem1>
      <ChildItem1>
      <ChildItem1>
   </LinearLayout>
</ListView>

You can simply follow this example. https://github.com/madhu314/sectionedgridview

Master
  • 2,945
  • 5
  • 34
  • 65