Comments (8)
I think I got it but I'm not sure if it will cover all cases. It seemed to fix it for me in a layout where the image is centered in the TileView and where the scaling starts at a 'fitCenter' state:
tileView.setMinimumScaleMode(ScalingScrollView.MinimumScaleMode.CONTAIN) tileView.setScaleLimits(0f, 2f)
When changing the TileView.updateViewport()
from
mViewport.right = mViewport.left + getMeasuredWidth(); mViewport.bottom = mViewport.top + getMeasuredHeight();
to
mViewport.right = mViewport.left + Math.min(getMeasuredWidth(), getScaledWidth()); mViewport.bottom = mViewport.top + Math.min(getMeasuredHeight(), getScaledHeight());
just the right amount of rows and columns are created.
I do not know what else will be affected by this however.
from tileview.
Is it possible that this is linked to the problem I described in #530 ?
from tileview.
It seems to be the same problem, yes. It's happening when the image does not completely fill the TileView. In that case, additional rows are requested at the bottom to completely fill the view (the top is fine - my image is centered). However, the images I'm using have a larger full scale resolution than the container. You seemed to only have issues with very small images.
from tileview.
with open source projects like this where i have very little time, if you can find or identify the specific issue (in this case, i think the suggestion is that there's something wrong with how the grid is calculated), that'd certainly help me get it fixed, considering the very limited amount of time i have to work on issues. if not, i'll give it a shot next time i can; probably a month or so. sorry for the hassle.
from tileview.
with open source projects like this where i have very little time, if you can find or identify the specific issue (in this case, i think the suggestion is that there's something wrong with how the grid is calculated), that'd certainly help me get it fixed, considering the very limited amount of time i have to work on issues. if not, i'll give it a shot next time i can; probably a month or so. sorry for the hassle.
Might have some time to look into it myself. Just to be sure: @inneke-dc you are using version 4.0.7 too, right?
from tileview.
with open source projects like this where i have very little time, if you can find or identify the specific issue (in this case, i think the suggestion is that there's something wrong with how the grid is calculated), that'd certainly help me get it fixed, considering the very limited amount of time i have to work on issues. if not, i'll give it a shot next time i can; probably a month or so. sorry for the hassle.
Might have some time to look into it myself. Just to be sure: @inneke-dc you are using version 4.0.7 too, right?
Yes, I'm using the most recent code.
from tileview.
mViewport.right = mViewport.left + Math.min(getMeasuredWidth(), getScaledWidth()); mViewport.bottom = mViewport.top + Math.min(getMeasuredHeight(), getScaledHeight());
Tested this with my project too. Solves the issue for small images too.
from tileview.
This is awesome! Thanks so much for digging in. I may need to make some minor tweaks but this looks very promising - I'll try to get his verified (and committed, hopefully) as soon as I get some time (I'll shoot for Mon-Tues of next week - gone all weekend).
Thanks again! Nice open source-ery ;)
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
- 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.