Giter Club home page Giter Club logo

Comments (4)

qinxianyuzou avatar qinxianyuzou commented on June 15, 2024 2

Yes, you are right. I have same problem. I see just half of my text when I do expand. Any solution out there for this? Thank you.

Please see my reply above.
if (!mRelayout || getVisibility() == View.GONE) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); return; }
to
if (getVisibility() == View.GONE) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); return; }

from expandabletextview.

qinxianyuzou avatar qinxianyuzou commented on June 15, 2024

I see a problem, because mRelayout this switch affect the execution of onMeasure, this switch will only limit the re-measurement at the time the text changes, and in recyclerView in, setText time may not accurately measure the width and height, needs The measurement is accurate after the complete itemView is drawn, so just let the onMeasure perform the measurement smoothly after the view is drawn to solve the problem. My current solution is to remove the mRelayout condition. I don't know what it will do now,maybe it affects performance?
------------------------------Above from Google Translate, the following is the original----------------------
我发现了问题所在,是因为mRelayout这个开关影响了onMeasure的执行,这个开关限制了只有在文本变化的时候才会重新测量,而在recyclerView中,setText的时候可能并不能测量准确的宽高,需要在完整的itemView绘制之后测量才准确,因此只要让onMeasure在view绘制之后也能顺利往下执行测量就能解决问题。我目前的解决办法是把mRelayout这个条件去掉,目前不知道这样会有什么影响,也许是影响性能?

from expandabletextview.

eniz1806 avatar eniz1806 commented on June 15, 2024

Yes, you are right. I have same problem. I see just half of my text when I do expand. Any solution out there for this? Thank you.

from expandabletextview.

taichushouwang avatar taichushouwang commented on June 15, 2024

Yes, you are right. I have same problem. I see just half of my text when I do expand. Any solution out there for this? Thank you.

Please see my reply above.
if (!mRelayout || getVisibility() == View.GONE) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); return; }
to
if (getVisibility() == View.GONE) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); return; }

In my case, remove mRelayout may cause shrink when click the textview first, so I also change the Animation reference #55

from expandabletextview.

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.