Comments (3)
How to fix it:
Class: AdaptiveTableLayout
public void scrollBy(int x, int y) {
// block scroll one axle
int tempX = mState.isRowDragging() ? 0 : x;
int tempY = mState.isColumnDragging() ? 0 : y;
int diffX = tempX;
int diffY = tempY;
int shadowShiftX = mManager.getColumnCount() * mSettings.getCellMargin();
int shadowShiftY = mManager.getRowCount() * mSettings.getCellMargin();
long maxX = mManager.getFullWidth() + shadowShiftX;
long maxY = mManager.getFullHeight() + shadowShiftY;
if (mState.getScrollX() + tempX < 0) {
// scroll over view to the left
diffX = mState.getScrollX();
mState.setScrollX(0);
} else if (mSettings.getLayoutWidth() > maxX) {
// few items and we have free space.
diffX = 0;
mState.setScrollX(0);
} else if (mState.getScrollX() + mSettings.getLayoutWidth() + tempX > maxX) {
// scroll over view to the right
diffX = (int) (maxX - mState.getScrollX() - mSettings.getLayoutWidth());
mState.setScrollX(mState.getScrollX() + diffX);
} else {
mState.setScrollX(mState.getScrollX() + tempX);
}
if (mState.getScrollY() + tempY < 0) {
// scroll over view to the top
diffY = mState.getScrollY();
mState.setScrollY(0);
} else if (mSettings.getLayoutHeight() > maxY) {
// few items and we have free space.
diffY = 0;
mState.setScrollY(0);
} else if (mState.getScrollY() + mSettings.getLayoutHeight() + tempY > maxY) {
// scroll over view to the bottom
diffY = (int) (maxY - mState.getScrollY() - mSettings.getLayoutHeight());
mState.setScrollY(mState.getScrollY() + diffY);
} else {
mState.setScrollY(mState.getScrollY() + tempY);
}
if (diffX == 0 && diffY == 0) {
return;
}
if (mAdapter != null) {
// refresh views
recycleViewHolders();
mVisibleArea.set(mState.getScrollX(),
mState.getScrollY(),
mState.getScrollX() + mSettings.getLayoutWidth(),
mState.getScrollY() + mSettings.getLayoutHeight());
addViewHolders(mVisibleArea);
refreshViewHolders();
}
}
from adaptivetablelayout.
Will be fixed in near future.
from adaptivetablelayout.
Fixed in 1.1.1 version
from adaptivetablelayout.
Related Issues (20)
- table not update count rows and columns when notifyDataSetChanged adapter HOT 1
- Is it possible to remove row headers shadow? HOT 2
- java.lang.IllegalAccessError HOT 1
- Refactoring
- AdaptiveTableLayout unnecesary sets allowBackup attribute HOT 1
- Update to API Level 29 HOT 1
- Refactor to AndroidX HOT 1
- Sample does not work on API Level 16 as library does HOT 1
- AdaptiveTableLayout crashes when loading an empty CSV HOT 1
- Is it possible to have Pull Down refresh functionality for AdaptiveTableLayout ? HOT 1
- notifyDataSetChanged() do not call onBindLeftTopHeaderViewHolder but does to every other header HOT 1
- How to write backend code for Travel portal ?
- Not able to click on view HOT 3
- Getting IllegalStateException; Please Help
- How to change the cell separator color to blue or any HOT 1
- How to show vertical scroll bar on the Table Layout
- Adaptive Table responses slow after notifyDataSetChanged() action set more than 3 times
- How can I Scroll to specific position
- Is it possible drag column and row and text change working together.
- Diff Utils support
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 adaptivetablelayout.