How to use "setViewBinder" in my Adapter for Listview

Asked

Viewed 52 times

0

How do I use setViewBinder in my Adapter? In Simplecursoradapter I can:

SimpleCursorAdapter adapter = new SimpleCursorAdapter(getActivity().getBaseContext(), R.layout.lista_chamados, cursor, from, to);
    setListAdapter(adapter);


    adapter.setViewBinder(new SimpleCursorAdapter.ViewBinder(){


           public boolean setViewValue(View view, Cursor cursor, int columnIndex){

               }
               return false;
           }
        }); 

But on my Adapter I can’t. How should I?

  • What is the class of your Adapter? In the API, only the SimpleCursorAdapter and the SimpleAdapter accept this interface. In the case of your Adapter, could extend SimpleAdapter to use this interface.

  • What would be the super class of this class?

  • @Wakim I’m not getting an extension SimpleAdapter to do so. There is another way to customize a listview object as you would with setViewBinder?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.