Comments (6)
Thanks for reporting that issue. I hope to be able to devote some time to outstanding issues this weekend.
If you have any patches/insight regarding a fix, feel free to make a pull request :)
from pulltorefresharp.
You're welcome, and sorry but no, I can't offer a solution. I looked into it and would've made a pull request if I had found a way to work it out.
I went down the path of modifying the ViewWrapper::OnInterceptTouchEvent function to ignore the touch event if the fast scrolling thumb is visible. The android.widget.FastScroller class has a public isVisible() function that would make that easy. Unfortunately, the android.widget.AbsListView class that declares the FastScroller instance declares it privately and doesn't provide a public getter that I saw.
AbsListView also has a protected "isVerticalScrollBarHidden" function, which checks for the existence of a FastScroller instance and its "isVisible" function return value. The result of that function is exactly what is needed to implement the solution I was considering but it is a protected, not public, function.
Hopefully you can come up with a different approach that will work or see something that I overlooked. Good luck and thanks for the component!
from pulltorefresharp.
I've come up with an, admittedly, somewhat naive solution to the problem. Checkout the new fastscroll branch to see what I've done to fix the issue (the sample app has been updated with a test for listview with fast scroll enabled as well), and let me know your thoughts.
Basically, the ViewWrapper
checks if the ContentView
is an AbsListView
and has FastScrollEnabled
. If that is the case, it simply ignores any touches within the boundary of where the fast scroll will be displayed. The value for the width of the fast scroll I gleaned from the Android R.dimens.fastscroll_thumb_width, which is unfortunately private (I could make this a configurable value for users who will be setting custom thumb drawables).
I know this isn't the greatest solution, but it does accomplish the goal of allowing fast scroll to work properly in conjunction with PullToRefresharp.
The diff: master...fastscroll
from pulltorefresharp.
Thanks for coming up with a fix for that Brett. That works for me. Its too bad the needed state info is out of reach, but that isn't your fault. I think this is the best solution given the information the component has available to it.
I also agree it will probably save you a future defect by making the thumb scroll width be configurable. I don't need that, but I can see where other users could.
from pulltorefresharp.
Ok, I'm going to merge this change then. There may be a more accurate way (yet still somewhat hacky) to determine if the fastscroll overlay is visible onscreen by inspecting the view hierarchy for the overlay and checking its visibility state, but for now I think this fix is sufficient.
from pulltorefresharp.
Closed with: 6dc2e19
from pulltorefresharp.
Related Issues (17)
- Objects on scrollview intercept touch events, pull to refresh doesn't work in that case HOT 1
- Getting started with the component. HOT 6
- Binary XML file line #1: Error inflating class pulltorefresharp.android.views.ViewWrapper HOT 5
- Long touches not registering when Listview is at top scrollposition HOT 3
- ItemClick event not firing in ListView with custom adapter
- Crash - with list is in startup view and touching screen upon startup HOT 1
- Problem using pulltorefresharp HOT 3
- Linker Problem HOT 2
- Header Background Color
- Mono.Android.Support.V4 reference vs Xamarin.Android.Support.V4? HOT 3
- Empty view not supported
- Custom ListView
- Clarify licensing terms HOT 1
- about the content view's height
- Event touch not handled with added views
- How to apply translation for different language?
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 pulltorefresharp.