Android : How to add a button at the end of a ListView in a Fragment?

on Sunday, October 26, 2014


I have a fragment activity which contains a ListView, and i need to add a button at the bottom of the list. This is a part of the code:



public class listview1 extends Fragment implements OnItemClickListener {

ListView list;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstances){
View rootView = inflater.inflate(R.layout.activity_main, container, false);
list = (ListView) rootView.findViewById(R.id.listView);
list.setAdapter(new CustomBaseAdapter(this.getActivity()));
list.setOnItemClickListener(this);
return rootView;
}


- CustomBaseAdapter extends a BaseAdapter which has a getView() method and all...


0 comments:

Post a Comment