Comments (8)
I've run into similar issue with my app and the problem is that TileView (or actually it's parent ZoomPanLayout) triggers a fling gesture even if the distance between two motion events is very small, thus causing some unwanted scrolling. This can be found in ZoomPanLayout.java around line 760 - performFling().
from tileview.
@redred77 sorry I didn't notice this issue when it was created. i did see the notification when onder7973 replied. My guess is that you're seeing artifacts as new samples and tile sets are rendered before the previous have been cleaned up. I'd suggest turning transtions off and setting all detail levels to the same sample image (just to test, not as a fix). If you don't see the flicker after that, it's probably as I guessed. If not, post back and I'll dig in a little more.
@onder7973 I think redred77 is experiencing something different. I think you're describing a pinch gesture that results in a small fling? LMK if that's not right. Otherwise, if you'd like to modify ZoomPanLayout to have a minimum distance reached before a fling is invoked, feel free to fork and issue a pull request. As long as existing API doesn't break, the code is legible, consistent with existing patterns, and performs reasonably, I'll generally accept pull requests that expand the usability of the widget.
That said, if you don't have the time or inclination to do it, I might add it if/when I get some appreciable free time, or if several users request it as well.
Thanks for your input.
from tileview.
@moagrius my comment was based on redred77's details:
"When I double tap, view scales to that position smoothly but sometimes it flickers."
that seemed very familiar to me as to what I noticed when double tapping the view. If you actually do the double tap pretty quickly it does fling the view and then scrolls/zooms based on doubletap gesture, which may look like flickering. Plus I can confirm that adding a min distance prevents this (I have a code in place that works). I'll see if I can fork it as I am normally using SVN with my projects, not Git.
from tileview.
cool
from tileview.
Changing the MINIMUM_VELOCITY constant from 50 to something like 500 is an easy way to fix the flickering without removing the fling Method.
50 as a default seems way too small I believe as it triggers with double taps.
from tileview.
I'm open to both approaches. If no one provides a reasonable fork in the next couple weeks, I'll do a patch myself.
from tileview.
I read all comments and could find the problem.
I think adjusting MINIMUM_VELOCITY is not the solution for inner problem.
The point is, fling scroll and double tap scrolling can occur simultaneously.
I think to stop fling before start double tap scrolling is more reasonable.
if (determineIfQualifiedDoubleTap()) {
scroller.forceFinished(true); // to stop fling
saveHistoricalScale();
saveDoubleTapHistory();
...
I am not sure if it is consistent and working well with all existing sources but it works well on my project.
from tileview.
thanks @redred77 - I've included your patch in the latest commit.
from tileview.
Related Issues (20)
- Issues scaling past 1f HOT 3
- Remote tile demo freezes and crashes HOT 2
- Combine smooth scroll and scale HOT 2
- Tiles not properly laid out when Scale < 1 with remote tiles HOT 15
- Open source but no license? HOT 2
- Markers disappear when zooming HOT 4
- Cannot add tile images on the fly HOT 1
- StreamProvider asked to provide data for rows and columns out of bounds with to small images HOT 5
- Tiles outside the image are created HOT 8
- White text on white background in Advanved Tile Demo HOT 1
- Get touched position when touch on the tileview (version 4.0.7)
- longtouch
- App killed in background crashes when returning to foreground HOT 1
- `android.os.BadParcelableException` regarding `com.moagrius.widget.ScrollView$SavedState.<init>` HOT 1
- Use in viewholder for recycler view. HOT 2
- build() method starts to return void instead of TileView HOT 1
- Mike passed away HOT 5
- Does this lib support SVG format
- JCenter -> MavenCenter
- implementation 'com.qozix:tileview:2.7.7' doesn't seem to work HOT 1
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 tileview.