Giter VIP home page Giter VIP logo

moretextview's Introduction

MoreTextView

一行代码实现TextView的“展开”和“收起”

1、在文本末尾,实现点击“展开”---展开所有文本,并把“展开”改为“收起”;点击“收起”,则收起文本; 2、“展开”和“收起”紧跟文本末尾。并且不换行。

需求介绍:

1、在文本末尾,实现点击“展开”---展开所有文本,并把“展开”改为“收起”;点击“收起”,则收起文本; 2、“展开”和“收起”紧跟文本末尾。并且不换行。

使用说明

new UtilMoreText(tv2,msg);//只需要传递两个参数,一个是TextView,一个是原始字符串

不想下载demod的话,可以直接引用

引用方式 compile 'com.smart.holder_library:holder_library:1.0.4'

使用上面引用依赖的方式,还会有其他额外的功能,该功能在使用了ListView和GridView的项目,能够极大程度解耦,方便修改和维护有兴趣,请转至:

https://github.com/xubinbin1024/CommonAdapter-master

UtilMoreText.java 源码地址

https://github.com/xubinbin1024/CommonAdapter-master/blob/master/holder_library/src/main/java/com/smart/holder_library/utils/UtilMoreText.java

moretextview's People

Contributors

binny1024 avatar

Watchers

James Cloos avatar weipingshi avatar

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.