Skip to content
/ fole Public
forked from bffcorreia/fole

Fole is a simple library, to handle collapse and expand of a TextView.

Notifications You must be signed in to change notification settings

sdsantos/fole

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Release

fole

Fole is a simple library that handles a toggle for you, to expand and collapse a TextView.

This is only the Alpha version, not tested yet!

Installing

    repositories {
        // ...
        maven { url 'https://jitpack.io' }
    }

    dependencies {
        compile 'com.github.bffcorreia:fole:v0.4.4-alpha'
    }

Basic Usage

    Fole.with(yourTextView).text("Your text...").maxLines(4).toggleView(yourToggleView);

Ellipsis Placeholder

    Fole.with(yourTextView).maxLines(4).ellipsisPlaceholder("###").toggleView(yourToggleView);

Callback

If you want to know when the TextView expand or collapse just add a FoleCallback.

    FoleCallback callback = new FoleCallback() {
          @Override public void onTextExpand() {
            // Handle onTextExpand!
          }
    
          @Override public void onTextCollapse() {
             // Handle onTextCollapse!
          }
        };
    Fole.with(yourTextView).maxLines(4).toggleView(yourToggleView, callback);

TODO

  • Tests
  • More...

About

Fole is a simple library, to handle collapse and expand of a TextView.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%