Comments (18)
It can not and has an explanation. If you have a table of 1000 rows and 5 columns would be necessary to measure 5000 views.
Could be implemented, but the computation time makes it impractical.
from tablefixheaders.
How long will it take to implement as it will be really good if this feature is available?
from tablefixheaders.
I agree with BraisGabin that it would be totally impractical to adjust the column widths automatically, given the potentially large number of records in the table. This could slow down the display to a crawl with a detriment to the functionality of this fantastic data display tool.
A much better solution would be to allow users to manually adjust the width of each column, either through external settings, or by dragging left/right the right edge of the column header (similar to the feature implemented in Excel). I have seen it done in the Windows Mobile 6.5 table/grid application.
from tablefixheaders.
The implementation of this feature is not hard. It will not take a lot of time but it is not efficient at all. I think @MariuszGSL proposals may be a good choice.
If you keep wanting to implement it I can give you some clues.
from tablefixheaders.
I also think that @MariuszGSL proposal would be good, if you can give me some clues on how to implement it that would be great. Thanks.
from tablefixheaders.
I meant clues for implementing the "bad" version.
Anyway you only need to use Adapter.notifyDataSetChanged() and the Adapter.getWidth(int position) to implement the @MariuszGSL proposal.
from tablefixheaders.
And do I have to put that in the StyleTable class or somewhere in the TableFixHeaders library?
from tablefixheaders.
No need to touch the library for this. You have to control in some way the events on the edges. Can not think of what may be the best way to do this.
from tablefixheaders.
Ok, I will have a look around and see if I can come up with anything.
from tablefixheaders.
Open a new issue in this case, plase.
from tablefixheaders.
Ok, If I do come up with anything I will open a new issue, Thanks.
from tablefixheaders.
Hey, are you able to give me some clues on how to implement the "bad" version as discussed above please?
from tablefixheaders.
Of course. All the work is in the onMeasure. Line 477.
You must create all the adapter's views and call
view.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
Then get the maximums and replace this information in the lines 490-497
from tablefixheaders.
I have entered the above method in the correct place, but I am not sure what to enter in lines 490-497? I have left those lines the same and the app runs but there is no horizontal scrolling, should I alter those lines and put the above method in?
from tablefixheaders.
you must remove those and fill the arrays widths and heights with the maximums.
from tablefixheaders.
This might be a really stupid question but what do you mean by maximums? Are you able to provide me with a example about filling the arrays widths and heights please?
from tablefixheaders.
I think you need to read the documentation about the custom views:
http://developer.android.com/reference/android/view/View.html The size and layout paragraphs are the more important.
You have to measure the views of each column. Choose the maximum onMeasureWidth() and put that value the corresponding position in the array widths.
from tablefixheaders.
Thanks very much for all your help, really appreciated.
from tablefixheaders.
Related Issues (20)
- How can i use it in a CoordinatorLayout HOT 1
- How can scroll in viewpage when columns stop scrolling HOT 4
- how to remove first column on fix hader HOT 2
- can i set header on image
- java.lang.NullPointerException: at com.inqbarna.tablefixheaders.TableFixHeaders.scrollBounds (TableFixHeaders.java:630) HOT 2
- Want to inflate more than one values in one column
- Issue with UI Thread block HOT 1
- search value in TableFixHeaders
- How to pass model array list to MatrixTableAdapter HOT 6
- How to insert data from api HOT 1
- Scroll issue when i put TableFixHeaders view inside a ScrollView/NestedScrollView HOT 2
- Text Color
- Not running in Tablet HOT 4
- Invalid content set in cell(view) during scrolling up,down or right, left...
- How to adapt the row height by context?
- How to set section header is aligned center on table? HOT 2
- Why does the table get inside the screen? HOT 5
- Android 9.0 landscape will crash
- after horizontal scrolling content get reset HOT 1
- Unable to use the lib
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 tablefixheaders.