Comments (12)
I can't reproduce it.
Are you using the master version? Device? API level? Screen shoots?
from tablefixheaders.
These are my settings:
-Master version.
-Galaxy Nexus (API level 17)
-Galaxy S3 (API level 16)
step 1:
Portrait orientation, scroll until the end in the X axis.
step 2:
rotate screen to landscape.
step 3:
In landscape scroll in any direction:
cheers
from tablefixheaders.
Do both mobiles use CyanogenMod? I don't know the reason of that behavior.
from tablefixheaders.
I'm having the same problem, i recalculated the tableFixHeaders.firstcolumn in the onConfigurationChanged().
Is there a better way to do it?
from tablefixheaders.
I can't reproduce this issue. Can you give me some sample code?
from tablefixheaders.
This may not be bug, about the user experience.
FamilyTable
<activity
android:name="com.inqbarna.tablefixheaders.samples.FamilyTable"
android:label="@string/family_adapter" android:configChanges="orientation|screenSize">
</activity>
and add more columns of data.
1.portrait orientation, scroll to the right most of the table.
2.rotate screen to landscape, when a table has many columns of data, i want to keep the table in the right position does not change. but FamilyTable the right blank.
or
3.i recalculated the tableFixHeaders.firstcolumn
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
//DisplayMetrics metric = new DisplayMetrics();
//getWindowManager().getDefaultDisplay().getMetrics(metric);
//int w = metric.widthPixels;
//int h = metric.heightPixels;
tableFixHeaders.firstColumn = 8;
((BaseTableAdapter)tableFixHeaders.getAdapter()).notifyDataSetChanged();
}
if the calculated error occurs above problem
Can you give me any suggestions?
from tablefixheaders.
Save scroll position. I'll implement this some day.
Did you try scrollTo()? I don't recommend you to change firstColumn value directly.
from tablefixheaders.
I don't know if this will work but try it, its worth a shot:
Just before the orientation changes, call the methods:
TableFixHeaders.getActualScrollX() and
TableFixHeaders.getActualScrollY() and save the values returned into local variables.
Once the orientation change has completed, just call:
TableFixHeaders.scrollTo(..) providing the values saved in the local variables and it should scroll to that X and Y position.
from tablefixheaders.
Yes, this is exactly what I do in my application.
I use: TableFixHeaders.scrollTo(0, LastRowPosition)
0 indicates that it should always scroll horizontally to the first column position (e.g. after orientation change). The LastRowPosition is calculated by multiplying the row number: (xxxx.row_ids.indexOf(m_id) by the RowHeight, to get the precise vertical scroll position.
You can see it in action in my app:
https://play.google.com/store/apps/details?id=com.eliteherd.elitemobile
from tablefixheaders.
I used tableFixHeaders.scrollTo(Integer.MAX_VALUE, 0), It still did not work.
from tablefixheaders.
Was this after the orientation change because it should work?
from tablefixheaders.
@liujmok You have got the scroll parameters entered in the wrong order:
The first value should be zero (horizontal scroll) and the second value should be set to the max vertical scroll. See below:
TableFixHeaders.scrollTo(0, Integer.MAX_VALUE)
See also my note above.
You have got these values set back to front.
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.