yuzumone / expandabletextview Goto Github PK
View Code? Open in Web Editor NEWAn android library that is TextView performs multiline ellipsize.
License: Apache License 2.0
An android library that is TextView performs multiline ellipsize.
License: Apache License 2.0
Hi thanks for your very useful library , but there is a problem , when set text from xml library doesn't work
Hi thanks for your very useful library , but there is a problem , when I want have single line library doesn't work
Hi. This exception happened when I set setExpand(false)
in onBindViewHolder
of RecyclerView.Adapter
on some text.
In this method of ExpandableTextView
in first execute if
block and then else
one (viewTreeObserver.addOnGlobalLayoutListener
) where exception is thrown (in performEllipsize
)
private fun collapseText() {
if (isFinishDraw) {
performEllipsize()
} else {
viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
override fun onGlobalLayout() {
viewTreeObserver.removeOnGlobalLayoutListener(this)
performEllipsize()
}
})
}
}
java.lang.ArrayIndexOutOfBoundsException: length=23; index=25
at android.text.StaticLayout.getLineStart(StaticLayout.java:1231)
at android.text.Layout.getLineVisibleEnd(Layout.java:1683)
at android.text.Layout.getLineExtent(Layout.java:1412)
at android.text.Layout.getLineMax(Layout.java:1389)
at net.expandable.ExpandableTextView.performEllipsize(ExpandableTextView.kt:145)
at net.expandable.ExpandableTextView.collapseText(ExpandableTextView.kt:131)
at net.expandable.ExpandableTextView.setExpand(ExpandableTextView.kt:51)
at com.example.MyAdapter$MyViewHolder$bind$$inlined$with$lambda$1.run(MyAdapter.kt:52)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:6:9-36
is also present at [com.github.yuzumone:ExpandableTextView:0.3.0] AndroidManifest.xml:12:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to element at AndroidManifest.xml:5:5-23:19 to override.
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.