[英]it is possible to put different layouts for child items in ExpandableListView?
我是android的新開發人員,我試圖在“可擴展列表視圖”中為子項放置不同的布局,但我找不到完整的教程來執行此操作,因此,如果有可能,請提供以下鏈接的幫助這種可擴展列表視圖的不錯的教程或簡單的代碼源。 謝謝
http://www.techiecommunity.net/Android/Android-ExpandableListView-Layout-示例本教程可以解決我的問題中提到的問題,但是我仍然遇到問題,因為我的類可擴展ListFragment,並且在此示例中擴展ExpandableListActivity,因此是一個解決方案?
只是不要擴展ExpandableListActivity
。 我還擴展了一個Fragment
,它工作正常。
然后使用正確的方法:
((ExpandableListView) getView().findViewById( R.id.list).setAdapter( m_expandableListAdapter);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.