Giter Club home page Giter Club logo

Comments (7)

abedsako avatar abedsako commented on June 11, 2024 2

I faced this issue the same issue.
after the Expandable layout is created and I set the text to the text view in the (second layout) is not displayed entirely,
I needed to find a quick fix so I have done the following:

  • Removed (app:expandable_secondLayout="@layout/expandable_second") from the XML layout.
  • Pass the (second layout) right before setting the text to its component
    (binding.myExpandableLayout.secondLayoutResource = R.layout.expandable_second)
  • Set the data (binding.myExpandableLayout.secondLayout.findViewById<TextView>(R.id.expandableDescription).text = longDescription)

*Note: if there is an image view with an image in it or a text view with text in it in the XML layouts it will redraw above it again

from expandablelayout.

sartajroshan avatar sartajroshan commented on June 11, 2024 1

Hi, a new version 1.0.7 has been released.
Please try using a new release. Thanks!

I faced this issue in version 1.0.7. When using recyelerView in secondLayout

from expandablelayout.

skydoves avatar skydoves commented on June 11, 2024

Hi, a new version 1.0.7 has been released.
Please try using a new release. Thanks!

from expandablelayout.

mariofelesdossantosjunior avatar mariofelesdossantosjunior commented on June 11, 2024

I'm having the same problem, is there any solution?

from expandablelayout.

DATL4G avatar DATL4G commented on June 11, 2024

@skydoves This is still a problem.
I tried to fix this and just couldn't find the reason why it works in your demo but not in my app.
I discoverd that this is caused when the layout height is changed because it's content changed.

To reproduce this just adjust this line in your demo MainActivity to change the text and make it larger dynamically:

expandable1.setOnExpandListener {
    if (it) {
        toast("expanded")
        expandable1.secondLayout.findViewById<TextView>(R.id.textView).text = "${getString(R.string.text_stars)}${getString(R.string.text_stars)}${getString(R.string.text_stars)}"
    } else {
        toast("collapse")
        expandable1.secondLayout.findViewById<TextView>(R.id.textView).text = "${getString(R.string.text_stars)}${getString(R.string.text_stars)}${getString(R.string.text_stars)}"
    }
}

from expandablelayout.

jdsdhp avatar jdsdhp commented on June 11, 2024

Hi, a new version 1.0.7 has been released.
Please try using a new release. Thanks!

I faced this issue in version 1.0.7. When using recyelerView in secondLayout

I'm having the same problem using 1.0.7 version

from expandablelayout.

sOlnblshkO avatar sOlnblshkO commented on June 11, 2024

I faced this issue the same issue. after the Expandable layout is created and I set the text to the text view in the (second layout) is not displayed entirely, I needed to find a quick fix so I have done the following:

  • Removed (app:expandable_secondLayout="@layout/expandable_second") from the XML layout.
  • Pass the (second layout) right before setting the text to its component
    (binding.myExpandableLayout.secondLayoutResource = R.layout.expandable_second)
  • Set the data (binding.myExpandableLayout.secondLayout.findViewById<TextView>(R.id.expandableDescription).text = longDescription)

*Note: if there is an image view with an image in it or a text view with text in it in the XML layouts it will redraw above it again

OH MY ***ING LIFE. THANKS A LOT.
I have faced same issue, but i was summarize all textview lines and multiplied it on some constant and after this reindicated layoutParams for secondLayout and it some how a little bit fixed my issues!
Thank you @abedsako

from expandablelayout.

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.