I added a Footer in a ListView, but this Footer will contain a list ( List<>
).
Footer is appearing, but it is showing only the first item in the list.
How to correctly display the list in Footer?
Sample code in pastebin
lvItens = (ListView) view.findViewById(R.id.lvItens);
List<String> lista = new ArrayList<String>();
lista.add("Item 1");
lista.add("Item 2");
lista.add("Item 3");
lista.add("Item 4");
lista.add("Item 5");
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, lista);
View viewFooter = LayoutInflater.from(getActivity()).inflate(R.layout.listview_footer, null, false);
ListView lvItensFooter = (ListView) viewFooter.findViewById(R.id.lvItens);
List<String> listaFooter = new ArrayList<String>();
listaFooter.add("Footer 1");
listaFooter.add("Footer 2");
listaFooter.add("Footer 3");
ArrayAdapter<String> adapterFooter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, listaFooter);
lvItensFooter.setAdapter(adapterFooter);
lvItens.addFooterView(viewFooter);
lvItens.setAdapter(adapter);
ListView-Footer http://felipearon.com.br/img/listview-footer.png >