Git Product home page Git Product logo

Comments (6)

pratikbutani avatar pratikbutani commented on July 16, 2024

Can you please put a video or gif to make me understand this thing more clear?

from constraintlayout.

jafu888 avatar jafu888 commented on July 16, 2024

For performance reasons MotionLayout does not honor layout request during animation.
It is seldom needed and has a large performance penalty. This is because many types of views when in doubt call requestLayout just to be on the safe side.
This can result in the effect you describe. Could you test by adding the below to you Transition?

    <Transition     motion:layoutDuringTransition="honorRequest" \>

from constraintlayout.

CamiloDelReal avatar CamiloDelReal commented on July 16, 2024

Oops I forgot to reply the first message. I tried this morning again using wrap_content. the problem persist in 2.0.4. I tried too with honorRequest, this time the view rect wasn't correctly painted at 100%, the text content blinks. I attached gif's and the sample project for it. First picture is the transition without honorRequest, the second one is using honorRequest
testing-motion.zip

motionlayout-textview-bad-layout
motionlayout-textview-bad-layout-requestHonor

from constraintlayout.

jafu888 avatar jafu888 commented on July 16, 2024

This will happen as long as the text is wrap content.
As the bounds change the text grows at a slightly different quantized pattern.
Every so often it wraps.
The quick and dirty workaround it add white space around the text (It wraps the white space).
Another workaround is fixing the size of the text filed.
Long term we will have to build a variant of text view that is padded.

from constraintlayout.

CamiloDelReal avatar CamiloDelReal commented on July 16, 2024

I currently use fixed sizes, but I don't think fixes sizes could resolve it always in every case.
But well, I think it can works for now :)

from constraintlayout.

jafu888 avatar jafu888 commented on July 16, 2024

We implemented MotionLabel to work around this.

from constraintlayout.

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.