简体   繁体   中英

it is possible to put different layouts for child items in ExpandableListView?

I'm a new developer with android and I'm trying to put different layouts for child items in Expandable List View but I can't found the complete tutorial to do this so if is possible to do this, please help with a link for a good tutorial or a simple code source for this type of Expandable List View. thanks

http://www.techiecommunity.net/Android/Android-ExpandableListView-Layout-示例本教程可以解决我的问题中提到的问题,但是我仍然遇到问题,因为我的类可扩展ListFragment,并且在此示例中扩展ExpandableListActivity,因此是一个解决方案?

Just don't extend ExpandableListActivity . I also extends a Fragment and it works fine.

Then use the correct method :

((ExpandableListView) getView().findViewById( R.id.list).setAdapter( m_expandableListAdapter);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM