Comments (17)
hello every body! I'm getting the same problem, I have tried using @billionbucks trick but it doesn't work. I'm not using final variables @kukreja-vikramaditya !
thanks in advance!
EDIT
I was using the wrong method! setText(@Nullable CharSequence text)
Using this one: setText(@Nullable CharSequence text, @NonNull SparseBooleanArray collapsedStatus, int position)
works good!
please modify the wiky!
from expandabletextview.
@Studentessa thanks, it works :-)
onBindViewHolder(ViewHolder holder, final int pos) {
....
SparseBooleanArray mTogglePositions = new SparseBooleanArray();
// setText(@Nullable CharSequence text, @NonNull SparseBooleanArray collapsedStatus, int pos)
holder.newsDescription.setText(listOfArticles.get(position).getDescription(), mTogglePositions , pos);
//where newsDescription is my TextView
...
}
from expandabletextview.
@Studentessa Thank you. It worked but also need to change animation 0 if content is enough long.
from expandabletextview.
@Studentessa Thanks,it works very good
from expandabletextview.
@deeps2 your solution was right, but it has some flaw initialize the SparseBooleanArray while creating RecyclerView adapter and pass it to the setText method. That should do it.
from expandabletextview.
have you fixed that ? i got the same problem: (
from expandabletextview.
Yes same here. Can you create a expand() and collapse() method?
from expandabletextview.
@kukreja-vikramaditya @jymycc @haonan1 seems like setting the visibility gone and then Visible at OnBindViewHolder
will fix it , (working for me)
from expandabletextview.
same here. How to solve it?
from expandabletextview.
If anyone can share sample code which reproduces what you are experiencing, I can take a look this weekend.
Thank you.
from expandabletextview.
I don't think it is a problem with library, could you guys check if your 'position' or 'holder' has the keyword 'final' before it?
@billionbucks @HolenZhou @Manabu-GT @jymycc @haonan1
from expandabletextview.
@Studentessa thanks a lot,you solve my problem!
from expandabletextview.
@Studentessa What's your mean about what you said that need to change animation 0 if content is enough long? I have a problem when collaping the text if content is enough long!
from expandabletextview.
@aiynmm what your'asking was refered by @monikagupta94 , maybe he can answer you. =D
from expandabletextview.
@aiynmm what your'asking was refered by @monikagupta94 , maybe he can answer you. =D
I'm sorry, I misread it! @Studentessa
from expandabletextview.
@Studentessa Thank you. It worked but also need to change animation 0 if content is enough long.
@monikagupta94 Could you tell me what should I do to solve this problem!
from expandabletextview.
Solution: while using in recyclerview, use SpareIntArray to record mMarginBetweenTxtAndBottom and mCollapsedHeight, and reuse them when ExpandableTextView's init value is 0.
Reuse items in reycleview cause this problem.
from expandabletextview.
Related Issues (20)
- TextView 内容足够长,超出一屏, mCollapsedHeight计算的有问题 HOT 7
- 和recyclerview配合一起使用的时候下拉刷新
- mCollapsedHeight always 0 , when click to close the ExpandView
- i set spannablestring in the text,it works error in recycleview when i collapse the it HOT 2
- shit
- How to hide the image button and create custom button? HOT 1
- Write the widget in xml ,but show nothing in screen.Anything wrong? HOT 5
- 内容显示不全
- In the recyclerview, the expansion does not display the entire content correctly. HOT 4
- Can not works with androidx in android 3.3 version and gradle version 3.3.0
- AndroidX
- There is no support for collapsing an already expanded textview. HOT 1
- I cannot add three dots while ExpandableTextView is Collapsed
- Not Compatible with AndroidX (Empty screen) HOT 1
- MaxLines on expanded TextView?
- How to set custom expand/collapse ImageButtons src? HOT 1
- Duplicate Issue Created by Mistake | GitHub Bug -.- | IGNORE
- Duplicate Issue Created by Mistake | GitHub Bug -.- | IGNORE
- Solution for "Text is not completely shown in Expanded State (Height Calculation Issue)" HOT 2
- Support for Android X
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expandabletextview.