I'm using this wrapper for InqBarna's library.
This is a code snippet of how to achieve the click events on table body.
You can see more ellaborated examples here.
TableFixHeaderAdapter.ClickListener<List<String>, BasicCellViewGroup> clickListenerBody = new TableFixHeaderAdapter.ClickListener<List<String>, BasicCellViewGroup>() {
@Override
public void onClickItem(List<String> array, BasicCellViewGroup viewGroup, int row, int column) {
viewGroup.vg_root.setBackgroundColor(ContextCompat.getColor(context, R.color.colorYellow));
Snackbar.make(viewGroup, "Click on " + viewGroup.textView.getText() + " (" + row + "," + column + ")", Snackbar.LENGTH_SHORT).show();
}
};
and so on for the rest of the table cells:
adapter.setClickListenerFirstHeader(clickListenerHeader);
adapter.setLongClickListenerFirstHeader(longClickListenerHeader);
adapter.setClickListenerHeader(clickListenerHeader);
adapter.setLongClickListenerHeader(longClickListenerHeader);
adapter.setClickListenerFirstBody(clickListenerBody);
adapter.setLongClickListenerFirstBody(longClickListenerBody);
adapter.setClickListenerBody(clickListenerBody);
adapter.setLongClickListenerBody(longClickListenerBody);
adapter.setClickListenerSection(clickListenerBody);
adapter.setLongClickListenerSection(longClickListenerBody);
Hope it helps you.