Comments (10)
Modify onTouchEvent. If you want horizontal scrolling diffY and velocityY must be 0.
from tablefixheaders.
So in MotionEvent.ACTION_MOVE something like this:
if (diffY == 0 && velocityY == 0) {
scrollBy(0, diffY);
} else {
scrollBy(diffX, 0);
}
Although that does not give the desired effect is that something like what I am supposed to be doing?
from tablefixheaders.
No, you must set those variables to 0. Replace the code where I set them
with some value to 0.
from tablefixheaders.
I think I did not ask the question correctly.
At the moment a user can scroll horizontally and with that same touch event they can scroll vertically as well (double scroll).
What I am after is that when a user is scrolling horizontally they cannot scroll vertically in the same touch event, and for example as soon as the finger is lifted and they decide to scroll vertically then they cannot scroll horizontally in the same touch event.
from tablefixheaders.
Read #4.
from tablefixheaders.
I had already tried #4, it kind of works but the scrolling is really slow.
I think it has got something to do with the vertigo?
Is it possible to have the feature that I want with the same normal speed of scrolling?
from tablefixheaders.
Of course, it's possible. But I don't have time to implement and test it. But I think it will be an interesting feature. If you implement it, please, pull request it.
from tablefixheaders.
OK, If I do figure out something I will do a pull request,
Thanks.
from tablefixheaders.
Hi, I have the same implementation. can you please help me how to do this?
I have tried like below in Action_move case. However, I am experiencing fast scroll while moving/dragging the scroll.
case MotionEvent.ACTION_MOVE: {
final int x2 = (int) event.getRawX();
final int y2 = (int) event.getRawY();
final int diffX = currentX - x2;
final int diffY = currentY - y2;
if (Math.abs(currentX - x2) > Math.abs(currentY - y2)) {
// going backwards: pushing stuff to the right
if (currentX < x2) {
Log.v("", "right");
}
// going forwards: pushing stuff to the left
if (currentX > x2) {
Log.v("", "left");
}
scrollBy(diffX, 0);
} else {
Log.v("", "y ");
if (currentY < y2) {
Log.v("", "down");
}
if (currentY > y2) {
Log.v("", "up");
}
scrollBy(0, diffY);
}
break;
from tablefixheaders.
+1
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.