All Projects → bffcorreia → Fole

bffcorreia / Fole

Licence: apache-2.0
Fole is a simple library to collapse and expand a TextView.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Fole

Expandablelayout
🦚 An expandable layout that shows a two-level layout with an indicator.
Stars: ✭ 448 (+568.66%)
Mutual labels:  expandable, collapse
Collapsibletextview
show or hide part of text only in a TextView
Stars: ✭ 135 (+101.49%)
Mutual labels:  textview, collapse
Rskgrowingtextview
A light-weight UITextView subclass that automatically grows and shrinks.
Stars: ✭ 820 (+1123.88%)
Mutual labels:  textview, expandable
Accordion-Collapse-react-native
React native Accordion/Collapse component, very good to use in toggles & show/hide content
Stars: ✭ 147 (+119.4%)
Mutual labels:  collapse, expandable
Doublelift
🦋 Expands and collapses a layout horizontally and vertically sequentially.
Stars: ✭ 343 (+411.94%)
Mutual labels:  expandable, collapse
Dropdowntextview
Simple drop-down(expandable) TextView for Android
Stars: ✭ 307 (+358.21%)
Mutual labels:  textview, expandable
TreeView
"TreeView - sub-cells simplified" (c). Enable subcells in UITableView with a single drop-in extension. CocoaPod:
Stars: ✭ 54 (-19.4%)
Mutual labels:  collapse, expandable
Expytableview
Make your table view expandable just by implementing one method.
Stars: ✭ 348 (+419.4%)
Mutual labels:  expandable, collapse
Grouprecyclerviewadapter
可增删改查、可动画展开收起、可吸附悬浮动态可配置的分组列表
Stars: ✭ 41 (-38.81%)
Mutual labels:  expandable, collapse
Syscrack
Virtual Online Crime Simulator (VOCS) written in PHP 7.0
Stars: ✭ 17 (-74.63%)
Mutual labels:  expandable
Expandabletextview
实现类似微博内容,@用户,链接高亮,@用户和链接可点击跳转,可展开和收回的TextView
Stars: ✭ 992 (+1380.6%)
Mutual labels:  textview
Android Robototextview
Implementation of a TextView and all its direct/indirect subclasses with native support for the Roboto fonts, includes the brand new Roboto Slab fonts.
Stars: ✭ 791 (+1080.6%)
Mutual labels:  textview
Roundprogresstextview
TextView with Round Pogress
Stars: ✭ 18 (-73.13%)
Mutual labels:  textview
Rwidgethelper
Android UI 快速开发,专治原生控件各种不服
Stars: ✭ 996 (+1386.57%)
Mutual labels:  textview
Ionic4 Hidenav
Ionic 4 header animations
Stars: ✭ 46 (-31.34%)
Mutual labels:  expandable
Rxmarkdown
📠Markdown for Android, supports TextView && EditText (Live Preview), supports code high light.
Stars: ✭ 714 (+965.67%)
Mutual labels:  textview
Better Link Movement Method
Attempts to improve how clickable links are detected, highlighted and handled in TextView
Stars: ✭ 684 (+920.9%)
Mutual labels:  textview
Ios Swift Collapsible Table Section
📱 A simple iOS Swift project demonstrates how to implement collapsible table section.
Stars: ✭ 1,134 (+1592.54%)
Mutual labels:  collapse
Nly Adminlte Vue
vuejs2 AdminLte3 template more than 50 components and 10 directives.such as collapse ,sidebar,container,infobox,breadcrumb,card,grid,dropdown,toast,navbar,timeline,icon,progress
Stars: ✭ 44 (-34.33%)
Mutual labels:  collapse
Android Expandicon
Nice and simple customizable implementation of Google style up/down expand arrow.
Stars: ✭ 871 (+1200%)
Mutual labels:  expandable

Fole Tweet

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

Please, star this repo if you find it useful. 🙃


DemoInstallingBasic UsageAnimations


Demo

Installing

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

    dependencies {
        implementation 'com.github.bffcorreia:fole:1.0.0'
    }

Basic Usage

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

Ellipsis Placeholder

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

Callback

If you want to know when the TextView expands or collapses 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);

Animations

To animate the TextView when it extends or collapses, simply add your animation.

    Animation animation = AnimationUtils.loadAnimation(context, android.R.anim.fade_in);
    Fole.with(yourTextView)
        .maxLines(4)
        .animation(animation)
        .toggleView(yourToggleView);

If you want to use different animations:

    Animation expandAnimation = AnimationUtils.loadAnimation(context, android.R.anim.fade_in);
    Animation collapseAnimation = AnimationUtils.loadAnimation(context, android.R.anim.slide_in_left);
    Fole.with(yourTextView)
        .maxLines(4)
        .expandAnimation(expandAnimation)
        .collapseAnimation(collapseAnimation)
        .toggleView(yourToggleView);

License

Copyright 2016 Bruno Correia

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].