Comments (6)
Hi Thomas,
Thanks for the nice words. Could you please state which method you are using for the "default" sorting column?
Best regards,
Ingo
from sortabletableview.
Hi Ingo, I could use SortableTableView.sort() but really even if i didn't specifically call any sort method, I would still prefer the view to show which column is sorted to start off with (i.e. default if you did nothing but just followed the sample setup). Thanks much!
from sortabletableview.
If you do not call the method void sort(final int columnIndex)
or void sort(final int columnIndex, final boolean sortUp)
or void sort(final Comparator<T> comparator)
it is not sorted at all. It is simply using the order of the given data. This is the reason why no sorting indicator is shown.
If you want to have the same "default" sorting for a certain table in your app, I recommend using the method void sort(final int columnIndex, final boolean sortUp)
.
from sortabletableview.
Hi Ingo, thanks for your response. Even if i sort by calling any of the sort( ) functions, data is being sorted but indicator is not being shown.
from sortabletableview.
I can't confirm that. I experienced the expected behaviour which is:
sort(Comparator<T> comparator)
-> sorts the column using the given comparator and will not display any indicator (as the given comparator does not need to belong to a certain column)sort(int index)
-> sorts the column ascending using the comparator set for the column with the given index. A second call to this method with the same column index will sort the table descending using the comparator set for the column with the given index. (behaves like a click on the column header)sort(int index, boolean sortUp)
-> sorts the table ascending or descending depending on the sortUp param using the comparator set for the column with the given index (suitable for creating a programatic "default" sorting)
I have tested this with the currently latest version (2.0.1)
from sortabletableview.
Thank you again for your response. You have helped me figure out the issue. The bug was that i was setting the adapter again (in my case in onLoadFinished() ) and so i needed to call sort(int index) twice again.
from sortabletableview.
Related Issues (20)
- Apply sorting on date column: HOT 8
- table responsiveness HOT 3
- How do I get the cell content? HOT 1
- "Mark" selected row without using a custom TableView Adapter? HOT 2
- where use simpletabledataadapter#setTextsize HOT 3
- Horizontal Scroll and Vertical Scroll HOT 2
- CheckBox to TableHeaderAdapter HOT 1
- Text alignment in the SortableTableView HOT 1
- Implement custom TableDataRowBackgroundProvider without re-populate table HOT 2
- Table Scrolling HOT 2
- Add footer view HOT 4
- Part of row's background gets white after long click
- inflating class de.codecrafters.tableview.TableView HOT 1
- Merge cells in a row HOT 1
- SortTableView scroll problem
- I want just find solution this. onclickData problem. - read one single cell value. If you can tell tips HOT 3
- Records are not showing using Kotlin
- reference Tableview is null
- onDataClickListener and onDataLongClickListener HOT 2
- Getting Duplicate class found error after adding this dependency HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sortabletableview.