Code Monkey home page Code Monkey logo

Comments (8)

inneke-dc avatar inneke-dc commented on June 18, 2024 1

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.

tva-TIS avatar tva-TIS commented on June 18, 2024

Is it possible that this is linked to the problem I described in #530 ?

from tileview.

inneke-dc avatar inneke-dc commented on June 18, 2024

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.

moagrius avatar moagrius commented on June 18, 2024

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.

tva-TIS avatar tva-TIS commented on June 18, 2024

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.

inneke-dc avatar inneke-dc commented on June 18, 2024

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.

tva-TIS avatar tva-TIS commented on June 18, 2024

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.

moagrius avatar moagrius commented on June 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.