Coder Social home page Coder Social logo

yuzumone / expandabletextview Goto Github PK

View Code? Open in Web Editor NEW
21.0 1.0 8.0 201 KB

An android library that is TextView performs multiline ellipsize.

License: Apache License 2.0

Kotlin 100.00%
android android-library android-textview kotlin kotlin-android

expandabletextview's Introduction

expandabletextview's People

Contributors

datl4g avatar yuzumone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

expandabletextview's Issues

not working

Hi thanks for your very useful library , but there is a problem , when set text from xml library doesn't work

not working

Hi thanks for your very useful library , but there is a problem , when I want have single line library doesn't work

Throw exception when call setExpand(false) in RecyclerView.Adapter

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 - Build failed

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.

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.