Actually it’s not ListView but ExpandableListView but it doesn’t really matter. Normally I’d do it this way:
<ScrollView >
<LinearLayout>
<ExpandableListView ... />
<TextView ... />
</LinearLayout>
</ScrollView>
..but I’ve read it’s consuming to have ListView inside ScrollView. I tried solving this by modifying ExpandListAdapter (getChildView()) :
public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View view, ViewGroup parent) {
if(isLastChild){
LayoutInflater inflater = (LayoutInflater) context.getSystemService(context.LAYOUT_INFLATER_SERVICE);
view = inflater.inflate(R.layout.extra_info_bottom, null);
}
else{
//get normal item view
}
return view;
}
but this way I can only append childs to groups. How can I append LinearLayout on the bottom outside of any group?
Just add the following code to add the a linear layout at the last listview block.
where the listfooter is the xml file where you can define your layout controlls.