1

How to create interface between Fragment and adapter?

view story
linux-howto

http://stackoverflow.com – I have fragment with ListView, say MyListFragment, and custom CursorAdapter. I'm setting onClickListener in this adapter for the button in the list row. public class MyListAdapter extends CursorAdapter { public interface AdapterInterface { public void buttonPressed(); } ... @Override public void bindView(final View view, final Context context, final Cursor cursor) { ViewHolder holder = (ViewHolder) view.getTag(); ... holder.button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { (HowTos)