Step are: 1
Crete 3 xml file a) list_items_column.xml
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<RelativeLayout
android:id="@+id/rl_row_layout_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
android:id="@+id/rl_row_layout_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/tv_heading"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:background="#E5EAF5"
android:gravity="center_vertical"
android:textStyle="bold" >
android:id="@+id/tv_heading"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:background="#E5EAF5"
android:gravity="center_vertical"
android:textStyle="bold" >
b) Expandable child is row_grid.xml
android:id="@+id/gridView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:columnWidth="80dp"
android:gravity="center"
android:numColumns="auto_fit"
android:stretchMode="columnWidth" >
3.Now the Last xml is grid childern.xml
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp" >
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test"
android:layout_marginTop="15sp"
android:textSize="15sp" >
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test"
android:layout_marginTop="15sp"
android:textSize="15sp" >
2 Step... In expandable list Adapter get Child View U can add following code.....
if (convertView == null) {
convertView = mInflater.inflate(R.layout.list_item_grid_row, null);
}
GridView label = (GridView) convertView.findViewById(R.id.gridView);
convertView = mInflater.inflate(R.layout.list_item_grid_row, null);
}
GridView label = (GridView) convertView.findViewById(R.id.gridView);
int totalHeight=0;
for (int size = 0; size < adapter.getCount(); size++) {
RelativeLayout relativeLayout = (RelativeLayout) adapter.getView(size, null,
label);
TextView textView = (TextView) relativeLayout.getChildAt(0);
textView.measure(0, 0);
totalHeight += textView.getMeasuredHeight();
}
for (int size = 0; size < adapter.getCount(); size++) {
RelativeLayout relativeLayout = (RelativeLayout) adapter.getView(size, null,
label);
TextView textView = (TextView) relativeLayout.getChildAt(0);
textView.measure(0, 0);
totalHeight += textView.getMeasuredHeight();
}
ViewGroup.LayoutParams params = (ViewGroup.LayoutParams)label.getLayoutParams();
if (params != null)
{
params.height = totalHeight;
}
if (params != null)
{
params.height = totalHeight;
}
return convertView;
}
}
Can u post me the full source code.
ReplyDeleteGive me Ur mail ID Prashanth
ReplyDeletecan u post me the full source code :D
ReplyDeletemy email id is littlemush@naver.com
Thank you !
Hello Akash Shah,
ReplyDeleteWould you please post me this source code to my mail hichemlaroussi@gmail.com
Thx in advance :)
can u post me the full source code :D
ReplyDeletemy email id is pal.soman77@gmail.com
Thank you !
can u post me the full source code :
ReplyDeletemy email id is sugneshlimbasiya@gmail.com
Thank you !
Sunday I will Send mail to all of You....Thanks Akash
ReplyDeleteHi can i get a copy of your source code also? Thanks
ReplyDeleteang_shaun@hotmail.com
best tutorial . Can you give full source code ? Thanks .
ReplyDeletekhangcntt.it92@gmail.com
hello, can you please send me your source code? patoevoix@gmail.com
ReplyDeletethank you
Hi Akash Shah,
ReplyDeletethis is very good tutorial, kindly if you share the source code so everyone can learn more from your best blog.
Thanks.
Hello Sir... please provide me also the source code my id is jyoti.minhas8@gmail.com
ReplyDeleteplease can you post me the full source code?
ReplyDeletemicrogomi@gmail.com
please can you mail me the source code
ReplyDeletedevrath.dev595@hotmail.com
azim3shaikh@gmail.com
ReplyDeletecan I see your source code?
ReplyDeleteI need this.
thank you for your appreciation
yeasolkim94@gmail.com
Hi, Can you please send the code to ashwanikumar04@gmail.com
ReplyDeleteHi, could yoy send the source code to christian.olivier8@gmail.com ? tnx
ReplyDeletei, could you send the source code to sagilorber8@gmail.com ? tnx
ReplyDeleteAkash Shahさん。
ReplyDeleteソース・コードをおねがいします。
ohdonghoon21@gmail.com
please share to full source code in my mail id cap.ujjawal@gmail.com
ReplyDeletehi, could you please share the code to immorality_boy [et] yahoo [dot] com
ReplyDeletehttps://github.com/coolwd10/ExpandablelistwithGirdview
Deleteplease share the source code or post it on this webpage. It would be very helpful.
ReplyDeleteasit_monty@yahoo.co.in
https://github.com/coolwd10/ExpandablelistwithGirdview
Deleteplease send me the full source code....
ReplyDeletehttps://github.com/coolwd10/ExpandablelistwithGirdview
DeleteHi All i added all file below link... U create ExpandablelistwithGirdview project in androd and add this file.
ReplyDeletehttps://github.com/coolwd10/ExpandablelistwithGirdview
Can u post me the full source code.
ReplyDeleteAnd my id is shekharsrivastava111@gmail.com
DeleteCan u post me the full source code.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteCan you post me the full source code.
ReplyDeletevishalgadhiya91@gmail.com
I have tryed the code at github, but the application stops every time I try to expand a group :/
ReplyDeletethis code adds scroll to every child grid view. How to ovoid it?
ReplyDeleteHello Akash Shah,
ReplyDeletecan you give me the full source of code in my email id apoorv.bam@gmail.com
Hello Sir,
ReplyDeleteCan u mail me the entire code
akswadkar35153515@gmail.com
Hello Sir,
ReplyDeleteCan u mail me the entire code
mdmanzil@gmail.com
please give me the library
ReplyDeleteHello
ReplyDeletePlease can you send all code on my mail kvinodchand@gmail.com
hai can you send me the full source code mail id : saikumarbadapatla@gmail.com
ReplyDelete