evrencoskun / TableView

TableView is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells.
MIT License
3.14k stars 459 forks source link

Inverse logic on allowClick #285

Closed anderscheow closed 3 years ago

anderscheow commented 4 years ago

Allow click cell, row and column listener are inverse based on the understanding of the variables name.

if(!mAllowClickInsideRowHeader) {   // <- Should it be if (mAllowClickInsideRowHeader) instead of (!mAllowClickInsideRowHeader)?
            RowHeaderRecyclerViewItemClickListener rowHeaderRecyclerViewItemClickListener = new RowHeaderRecyclerViewItemClickListener
                    (mRowHeaderRecyclerView, this);
            mRowHeaderRecyclerView.addOnItemTouchListener(rowHeaderRecyclerViewItemClickListener);
}
if(!mAllowClickInsideColumnHeader){   // <- Should it be if (mAllowClickInsideColumnHeader) instead of (!mAllowClickInsideColumnHeader)?
            ColumnHeaderRecyclerViewItemClickListener columnHeaderRecyclerViewItemClickListener = new
                    ColumnHeaderRecyclerViewItemClickListener(mColumnHeaderRecyclerView, this);
            mColumnHeaderRecyclerView.addOnItemTouchListener
                    (columnHeaderRecyclerViewItemClickListener);
}
if(!mTableView.isAllowClickInsideCell()) {   // <- Should it be if (mTableView.isAllowClickInsideCell()) instead of (!mTableView.isAllowClickInsideCell())?
            recyclerView.addOnItemTouchListener(new CellRecyclerViewItemClickListener(recyclerView,
                    mTableView));
}
MGaetan89 commented 4 years ago

Hi @anderscheow,

I proposed a fix for that in #298

MGaetan89 commented 4 years ago

Thanks for reporting that. The fix was merged in master and will be part of the next release.

Zardozz commented 4 years ago

Any idea when this is going to be released? A the moment with 0.8.9 you cannot create a TableView programmatically without clickListeners as there are no setters for these variables and they default to "false" which actually means "true"

Zardozz commented 4 years ago

Thanks 0.8.9.2 release fixes this issue for me.

MGaetan89 commented 3 years ago

@anderscheow can you try the latest version of the library, and close the issue if it works for you?

anderscheow commented 3 years ago

The issue is solved for me. Thanks.