SortableTableView
SortableTableView copied to clipboard
I want to wrap the all raw cell with my custom view group.
Library is very handy. But I got a problem when I want to wrap all cell in a custom view group.
As i have seen the code of this library. I found that getView() method is final, So that i can not change the behaviour of getView(), And all cell are inserted in LinearLayout,.
What i want to achieve is, i want swipe delete row functionality. So that i need to change the wrapper of all cell view. So currently I just download library, and remove the final key word from getView() and override the method, and wrap whole LinearLayout with SwipeLayout.
So my question why getView() is final ? Why don't you allow from overriding it, so that people can modified it according to their requirement.
Hi @msquare097,
the reason why this method is final is because it contains the main logic that makes the table a table. If this method is overridden by somebody who is not exactly knowing what he is doing, than he could destroy the full functionality of the table. But instead of removing the final modifier from the getView method there could be a new entity set on the Table, that wrapps each row view inside another view. This other view would be by default no view and in your case it would wrap the row view inside a SwipeLayout. What do you think about this idea?
Best regards, Ingo
Hii @ISchwarz23 that's cool and thanks for reply .. Just give any mechanism that if any one want to wrap your row with other layout by some where , or they can use layout which comes by default. but be careful when you provide this, because when added my custom wrapper to your row view the listeners are not working properly. I mean when I long click on row the both dataLongClicked and dataClicked called. May be I have used SwipeLayout so that it was happen. But make sure to test it properly.