I need to add a table layout with an expandable list as a child in one of
the children of an expandable list.That is in the apis already provided we
have a single level expandable list.I want to add table as the child.And in
turn in the table i have an expandable list.How do i acheive this?

I tried the code below:

@Override
    public View getChildView(int groupPosition, int childPosition,
            boolean isLastChild, View convertView, ViewGroup parent) {

        if (groupPosition == 1 && childPosition == 0) {
                TableLayout tableLayout = new TableLayout(context);
                TableLayout.LayoutParams lp = new TableLayout.LayoutParams(
                        ViewGroup.LayoutParams.FILL_PARENT, 500);
                lp.setMargins(40, 0, 0, 0);
                tableLayout.setLayoutParams(lp);
                TableRow tableRow = new TableRow(context);
                ExpandableListView expandableListView = new
ExpandableListView(
                        context);
                //expandableListView.setLayoutParams(params);
                ExpandableListAdapter mySubListAdapter = new
MySubListExpandableListAdapter(
                        context);

                expandableListView.setAdapter(mySubListAdapter );
                tableRow.addView(expandableListView);
                tableLayout.addView(tableRow);
                return tableLayout;
         }else {
            Log.i(getClass().getName(), "In getChildView ");
            TextView textView = getGenericView();
            textView.setText(getChild(groupPosition,
childPosition).toString());
            return textView;
        }
}


Also how do I enable logging in these Overriden methods.I dont see the
logs.I able to see the logs in the other methods.

Thanks for your time.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to