noowenz / showmoreless Goto Github PK
View Code? Open in Web Editor NEWA simple Android library for displaying a more and less functionality in TextView and very easy to Convert your TextView in ExpandableTextView
License: Apache License 2.0
A simple Android library for displaying a more and less functionality in TextView and very easy to Convert your TextView in ExpandableTextView
License: Apache License 2.0
It works fine for a normal textview but when i use it with recyclerview. It only shows see more/ see less but they are not clickable and the color also does not change
Hi
frist of all, i want to thank you for this library, works like charm in Kotlin app.
but i found some issue that , when i use this library with Linkify , the Linkify not working to detect any mail, url, or phone numbers.
i give you some snapcode :
postContent.text = data.content.toString()
Linkify.addLinks(postContent, Linkify.ALL)
ShowMoreLess.Builder(context)
.textLengthAndLengthType(
length = 3,
textLengthType = ShowMoreLess.TYPE_LINE
)
.showMoreLabel("show more")
.showLessLabel("show less")
.showMoreLabelColor(Color.parseColor("#EF233C"))
.showLessLabelColor(Color.parseColor("#EF233C"))
.expandAnimation(expandAnimation = true)
.textClickable(
textClickableInExpand = true,
textClickableInCollapse = true
)
.build().apply {
data.content?.let { addShowMoreLess(postContent, it, false) }
}
i don't know that i'm wrong, or maybe this library not working with Linkify atm,
hope you can reply soon
It makes sense to hardcode ellpisis before seeMoreLabel but it does not makes much sense to add ellipsis before showLessLabel as the text will be expanded to maxLength / maxLines.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.