android可扩展列表需要帮助

时间:2011-06-01 09:52:28

标签: android position expandablelistview

expListAdapter = new ColorAdapter(this, GrouppList, colors);
        //  setListAdapter(expListAdapter);
            exlv1=(ExpandableListView) findViewById(R.id.expandableListView1);
            this.exlv1.setAdapter(expListAdapter);
            //exlv1.setAdapter(expListAdapter);
            this.exlv1.setOnItemClickListener(new OnItemClickListener() {

                @Override //THIS NOT WORKING
                public void onItemClick(AdapterView<?> aview, View v,
                        int position, long id) {
                    Toast.makeText(FindFilesByType.this, "position "+position, Toast.LENGTH_LONG).show();
                    // TODO Auto-generated method stub

                }
            });
            this.exlv1.setOnChildClickListener(new OnChildClickListener() {

                @Override//THIS NOT WORKING
                public boolean onChildClick(ExpandableListView arg0, View arg1, int arg2,
                        int arg3, long arg4) {
                    // TODO Auto-generated method stub
                    Toast.makeText(FindFilesByType.this, "position 1 : "+arg3, Toast.LENGTH_LONG).show();
                    return false;
                }
            }); 
into the above code i wat to know which item has clicked from the list but i am not able to know that
i want to know its position i've used expandable list what is i am missing?
thaks in advance..