ExpandableTextView - Read More TextView for Android

Overview

ExpandableTextView

Read More TextView for Android

Usage

Gradle

dependencies {
    implementation 'com.wayne.expandabletextview:expandable-textview:1.1.3'
}

How to use

  • xml
">
<com.wayne.expandabletextview.ExpandableTextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:expandable_text_font="@font/roboto_bold"                                             
    app:expandable_gradient_view_height="16dp"
    app:expandable_text="text"
    app:expandable_text_collapsedLines="3"
    app:expandable_text_color="@android:color/black"
    app:expandable_text_line_spacing_extra="4sp"
    app:expandable_text_size="14sp" />
  • kotlin
class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        et_test.stateChangeListener = object : OnStateChangeListener {
            override fun onStateChanged(state: ExpandableTextView.State) {
                tv_current_state.text = state.name
            }
        }
        // change font
        et_test.textTypeface = ResourcesCompat.getFont(this, R.font.roboto_bold)
    }
}

Attributes

  • expandable_gradient_view_height (16dp)
  • expandable_text ("")
  • expandable_text_collapsedLines (4)
  • expandable_text_color (Color.BLACK)
  • expandable_text_line_spacing_extra (8dp)
  • expandable_text_size (14dp)
  • expandable_text_font

Important note while applying font

  • You must create a directory to res/value/ and place the font file within that path.

Fetures

  • expand/colleapse animation

License

Copyright 2020 @Wayne

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.
You might also like...
Android slanted TextView.
Android slanted TextView.

SlantedTextView Android slanted TextView . 中文版 Preview Gradle compile 'com.haozhang.libary:android-slanted-textview:1.2' XML Layout com.haozhang.lib.

() An Android TextView with a shimmering effect
() An Android TextView with a shimmering effect

Shimmer for Android This library is DEPRECATED, as I don't have time to mainatin it anymore. But feel free to go through the code and copy that into y

An Android TextView that always displays an auto refreshing relative time span with respect to a reference time
An Android TextView that always displays an auto refreshing relative time span with respect to a reference time

android-ago This library provides RelativeTimeTextView, a custom TextView that takes a reference time and always displays the relative time with respe

a super textview for android
a super textview for android

SuperTextView 重磅推出SuperTextView2.x版本,属性参数相比1.x有些变化,1.x的用户升级2.x的时候请注意 1、功能描述 SuperTextView是一个功能强大的View,可以满足日常大部分布局样式,开发者可已自行组合属性配置出属于自己风格的样式!可能描述起来没有概念

Build valid HTML for Android TextView
Build valid HTML for Android TextView

HTML Builder Build valid HTML for Android TextView. Description There is a lovely method on the android.text.Html class, fromHtml(), that converts HTM

Animation effects to text, not really textview
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

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

A Custom TextView with trim text
A Custom TextView with trim text

ReadMoreTextView A Custom TextView with trim text Download To add the ReadMoreTextView library to your Android Studio project, simply add the followin

AutoLinkTextView is TextView that supports Hashtags (#), Mentions (@) , URLs (http://), Phone and Email automatically detecting and ability to handle clicks.
AutoLinkTextView is TextView that supports Hashtags (#), Mentions (@) , URLs (http://), Phone and Email automatically detecting and ability to handle clicks.

AutoLinkTextView Deprecated Please use the new version of AutoLinkTextView AutoLinkTextView is TextView that supports Hashtags (#), Mentions (@) , URL

Releases(v1.1.3)
Owner
You kwangwoo
Android, Flutter Developer
You kwangwoo
Mentions-TextView - Make Mentions and hashtags clickable in Textview

Mentions Textview Custome Textview with Mentions and hashtags being clickable. D

null 2 Jan 9, 2022
Form validation and feedback library for Android. Provides .setText for more than just TextView and EditText widgets. Provides easy means to validate with dependencies.

android-formidable-validation Form validation and feedback library for Android. Provides .setText for more than just TextView and EditText widgets. Pr

Linden 147 Nov 20, 2022
Android's TextView that can expand/collapse like the Google Play's app description

ExpandableTextView ExpandableTextView is an Android library that allows developers to easily create an TextView which can expand/collapse just like th

Manabu S. 4k Dec 28, 2022
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

Hieu Rocker 3.6k Jan 5, 2023
Android experiment showing a sinking TextView

Titanic is an Android experiment reproducing this effect.

Romain Piel 1.8k Dec 15, 2022
Advanced Android TextView

Advanced Android TextView Companion app for my Advanced Android TextView talk, demostrating: Animated CompoundDrawable Text shadow Custom font Non-bre

Chiu-Ki Chan 1.2k Dec 9, 2022
This is based on an open source autosizing textview for Android.

SizeAdjustingTextView This is based on an open source autosizing textview for Android I found a few weeks ago. The initial approach didn't resize mult

Elliott Chenger 255 Dec 29, 2022
An extension of Android's TextView, EditText and Button that let's you use the font of your choice

AnyTextView (deprecated) Note: AnyTextView is no longer being maintained. I recommend replacing AnyTextView with the Calligraphy library instead. Frus

Hans Petter Eide 165 Nov 11, 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
Lightweight android library for highlighting sections of a textview, with optional callbacks.

Linker Lightweight android library for highlighting Strings inside of a textview (ignoring case), with optional callbacks. Language: Java MinSDK: 17 J

Josh Gainey 35 Apr 30, 2022