Giter Site home page Giter Site logo

noowenz / showmoreless Goto Github PK

View Code? Open in Web Editor NEW
56.0 5.0 9.0 402 KB

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

Kotlin 100.00%
android-library android kotlin-android java textview emojis joypixels

showmoreless's Issues

Not working for recyclerview

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

Not working with Linkify

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

lessLabel has "..." (ellipsis) prepended

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.

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.