0
List pdfFiles = new ArrayList();
List directories = new ArrayList();
List otherFiles = new ArrayList();
/* Code to populate them */
ArrayAdapter pdfFilesArrayAdapter = new ArrayAdapter(this, R.layout.pdf_files, pdfFiles);
ArrayAdapter otherFilesArrayAdapter = new ArrayAdapter(this, R.layout.other_files, otherFiles);
ArrayAdapter directoriesArrayAdapter = new ArrayAdapter(this, R.layout.directories, directories);
3種類のTextViewレイアウトが使用されています。 今私は、私は、このリストビューにすべてのアダプタを追加したい3つの異なるarrayAdaptersを1つにまとめるには?
ListView listView = (ListView) findViewById(R.id.list);
... ListViewコントロールを持っています。それらを1つに結合する方法は?あなたは、キー値を渡すと、アダプタクラスで管理することができるよりもライブラリを使用したくない場合は
使用し、私の 'MergeAdapter':https://github.com/commonsguy/cwac-マージ – CommonsWare