Question

ListView Footer

RelativeLayout listFooterView = (RelativeLayout) inflater.inflate(
            R.layout.my_footer_layout, null);
getListView().addFooterView(listFooterView);

ListView OnClickListener

listView.setOnItemClickListener(new OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView<?> arg0, View arg1,
                int position, long id) {
            // TODO Auto-generated method stub
            Intent i = new Intent(getApplicationContext(),
                    Abc.class);
            startActivity(i);

        }
    });

On Click Listener works even if I click on footer View. How to disable click event on for footer.

Thanks in Advance

Was it helpful?

Solution

Try to add your footer with this function: addFooterView (View v, Object data, boolean isSelectable)

Try something like this:

RelativeLayout listFooterView = (RelativeLayout) inflater.inflate(
            R.layout.my_footer_layout, null);
getListView().addFooterView(listFooterView,null,false);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top