A simple library for hide and show text with animation.

Overview

ViewMore TextView Download

ViewMore TextView allows you to use a TextView by hiding the content of the text by a number of established lines and to display all the content expanding the TextView by a collapsing/expanding animation. It's possibile use an ellipses text or a foreground color gradient or both to hide the content. 🚀

Here some examples:

example example

Setup

In your Gradle dependencies add:

implementation "it.mike5v:viewmore-textview:$latest_release"

Usage

  • visibleLines -> number of visible lines
  • isExpanded -> state of textview (default is false)
  • animationDuration -> duration of the animation in ms
  • foregroundColor -> color of the foreground gradient layer (default is Transparent)
  • ellipsizeText -> text to use instead of default ellipses
  • ellipsizeTextColor -> color of ellipsize text
  • isUnderlined -> underline the ellipsize text
    <it.mike5v.viewmoretextview.ViewMoreTextView
        android:id="@+id/viewMore"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="32dp"
        android:layout_marginTop="32dp"
        android:layout_marginRight="32dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:ellipsizeText="View More"
        app:duration="500"
        app:visibleLines="3"
        app:isExpanded="false"/>

or programmatically

viewMore
    .setAnimationDuration(500)
    .setEllipsizedText("View More")
    .setVisibleLines(3)
    .setIsExpanded(false)
    .setEllipsizedTextColor(ContextCompat.getColor(this, R.color.colorAccent))

and

viewMore.setOnClickListener {
    viewMore.toggle()
}
You might also like...
Android library contain custom realisation of EditText component for masking and formatting input text
Android library contain custom realisation of EditText component for masking and formatting input text

Masked-Edittext Masked-Edittext android library EditText widget wrapper add masking and formatting input text functionality. Install Maven dependency

A library to show emoji in TextView, EditText (like WhatsApp) for Android
A library to show emoji in TextView, EditText (like WhatsApp) for Android

Discontinued This projected is discontinued. Please consider using other alternative, i.e EmojiCompat. Contact me if you want to continue working on a

Chips EditText, Token EditText, Bubble EditText, Spannable EditText and etc.. There are many names of this control. Here I develop easy to understand , modify and integrate Chips Edit Text widget for Android
Chips EditText, Token EditText, Bubble EditText, Spannable EditText and etc.. There are many names of this control. Here I develop easy to understand , modify and integrate Chips Edit Text widget for Android

Chips EditText Library Chips EditText, Token EditText, Bubble EditText, Spannable EditText and etc.. There are many names of this control. Here I deve

MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.
MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.

MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.

Androids EditText that animates the typed text. EditText is extended to create AnimatedEditText and a PinEntryEditText.
Androids EditText that animates the typed text. EditText is extended to create AnimatedEditText and a PinEntryEditText.

AnimatedEditText for Android This repository contains AnimatedEditText and TextDrawable all of which extend the behaviour of EditText and implement fe

Add text masking functionality to Android EditText. It will prevent user from inserting not allowed signs, and format input as well.
Add text masking functionality to Android EditText. It will prevent user from inserting not allowed signs, and format input as well.

MaskFormatter MaskFormatter adds mask functionality to your EditText. It will prevent user from inserting not allowed signs, and format input as well.

RichEditor for Android is a beautiful Rich Text WYSIWYG Editor for Android.
RichEditor for Android is a beautiful Rich Text WYSIWYG Editor for Android.

RichEditor for Android is a beautiful Rich Text WYSIWYG Editor for Android. Looking for iOS? Check out cjwirth/RichEditorView Supported Functions Bold

A TextView that automatically resizes text to fit perfectly within its bounds.
A TextView that automatically resizes text to fit perfectly within its bounds.

AutoFitTextView A TextView that automatically resizes text to fit perfectly within its bounds. Usage dependencies { compile 'me.grantland:autofitt

:page_facing_up: Android Text Full Jusiftication / Wrapping / Justify / Hyphenate - V2.0
:page_facing_up: Android Text Full Jusiftication / Wrapping / Justify / Hyphenate - V2.0

LIBRARY IS NO LONGER MAINTAINED If you want to adopt + maintain this library, please drop me a message - [email protected] Android Full Justific

Comments
  • Can't set Linkify

    Can't set Linkify

    How to make textview clickable if there is any link in string?

    I want to show link and it's clickable also

    Linkify.addLinks(viewMore, Linkify.WEB_URLS) Linkify.addLinks(viewMore, Linkify.PHONE_NUMBERS) Linkify.addLinks(viewMore, Linkify.ALL)

    opened by bhavin1994 1
  • API Level issue

    API Level issue

    Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library [it.mike5v:viewmore-textview:1.1.3] /Users/admin/.gradle/caches/transforms-2/files-2.1/da743fcdf2a7bdf83acbefd187b515cf/jetified-viewmore-textview-1.1.3/AndroidManifest.xml as the library might be using APIs not available in 19 Suggestion: use a compatible library with a minSdk of at most 19, or increase this project's minSdk version to at least 21, or use tools:overrideLibrary="it.mike5v.viewmoretextview" to force usage (may lead to runtime failures)

    opened by chnouman 0
Releases(1.1.3)
Owner
Michele Quintavalle
Michele Quintavalle
RTL marquee text view android right to left moving text - persian - farsi - arabic - urdo

RTL marquee text view android right to left moving text - persian - farsi - arabic - urdo

mehran elyasi 4 Feb 14, 2022
A little animation framework which could help you to show message in a nice looking way

TextSurface A little animation framework which could help you to show message in a nice looking way. Usage Create TextSurface instance or add it in yo

Eugene Levenetc 2.3k Dec 30, 2022
Animation effects to text, not really textview

HTextView Animation effects with custom font support to TextView see iOS Effects see Flutter Effects Screenshot type gif Scale Evaporate Fall Line Typ

hanks 5.5k Jan 5, 2023
Micro Template 📃 A very tiny and simple text templating library for Kotlin.

Micro Template ?? A very tiny and simple text templating library for Kotlin. It has very limited features, so it's intended to be used for short templ

Matteo Mirk 24 Aug 20, 2022
Digipad is a simple library for Android that only show a numeric keyboard onscreen

Digipad is a simple library for Android that only show a numeric keyboard onscreen Adding dependencies Add this to your build.gradle:

Yoga C. Pranata 7 Jun 24, 2022
A simple Android library to protect part of text using Span

Text Protector A simple Android library to "protect" part of text using Span What is this? This is a small library for replacing part of a text in a T

Oleg Nestyuk 4 May 16, 2022
Irineu A. Silva 2 Feb 17, 2022
Simple way to create linked text, such as @username or #hashtag, in Android TextView and EditText

Simple Linkable Text Simple way to create link text, such as @username or #hashtag, in Android TextView and EditText Installation Gradle Add dependenc

Aditya Pradana Sugiarto 76 Nov 29, 2022
Dealing with Android Text by simple way to get high performance.

Gapo Android RichText RichText supports Hashtag, Mention, Url, Phone Number, Email, Markdown, Custom Span, SeeMore/SeeLess by limited line or length,

GapoWork 8 Oct 20, 2021
Dealing with Android Text by simple way to get high performance.

Gapo Android RichText RichText supports Hashtag, Mention, Url, Phone Number, Email, Markdown, Custom Span, SeeMore/SeeLess by limited line or length,

GapoWork 8 Oct 20, 2021