-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expands once but won't collapse #8
Comments
Hi Michael thanks for reporting this issue! Can you provide me your layout file and a code snippet from your Fragment / Activity? I'll try to reproduce the issue on my side and help you out asap. Thanks again! |
Hi Michael did you already find some time to check my previous questions to you? Thanks! |
I have set max lines 4. On first load I have 4 lines. I click on the text, it expands. Than I click to collapse, it collapses to 4 and than expands back. Than if I click again nothing happens. Text stays expanded. Layout is a bit stripped down..
` How ever, I used a different approach at the end and I don't have the orig element, but this is the fragment layout where I used the ExpandableTextView. Now I is just a simple TextView, just renamned that one so you can see where it was originally. Same thing happen to me as mentioned above. |
Hi Tomas thanks for reporting this issue! If you want a quick fix for your problem, use android:maxLines="4" in your layout file instead of using expandText.setMaxLines(4); in your Activity / Fragment. I'll add support for also using the setMaxLines() method. Good luck! |
how to use this textview in listview in listitem row with simpleAdapter? |
Setting MaxLines in code is crucial for XML-free Kotlin's anko layouts... |
I've made a forked version of this library that allows setting the max lines in code: https://github.com/zacharee/Android-ExpandableTextView. Here's the relevant commit: zacharee@5fc91d3 I just changed any calls to |
Hello,
My issue is that the button to expand the text only works on the first try. When I load the screen, I can expand the text correctly. However, when I try to collapse it, it looks like it's collapsing but then it expands again and then the button does not collapse or expand anything anymore. Running debug I can see that it is running collapse() method... It just is not correctly collapsing.
Expands fine here
Starts to collapse but gets about halfway before expanding again. Does not work after this
The text was updated successfully, but these errors were encountered: