GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - AndroidDeveloperLB/AutoFitTextView: A TextView that automatically fit its font and line count based on its available size and content

BranchesTags
Open more actions menu

Latest commit

 

History

85 Commits
85 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
AutoFitTextViewLibrary
AutoFitTextViewLibrary
 
 
AutoFitTextViewSample
AutoFitTextViewSample
 
 
gradle/wrapper
gradle/wrapper
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
animationPreview.gif
animationPreview.gif
 
 
build.gradle.kts
build.gradle.kts
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle.kts
settings.gradle.kts
 
 

Repository files navigation

Release

AutoFitTextView

A TextView that automatically fits its font and line count based on its available size and content.

This code is heavily based on this StackOverflow thread.

The sample shows how the library handles various parameters being changed on the TextView: width, height, number of lines allowed, and the content (text) itself. You can play with the various properties to see how the library handles them.

Note: The library is updated to use Kotlin DSL, modern AndroidX libraries, and has a minimum SDK requirement of 21.

Preview

preview animation

Import using Gradle (Kotlin DSL)

Add JitPack to your settings.gradle.kts:

dependencyResolutionManagement {
    repositories {
        ...
        maven { url = uri("https://jitpack.io") }
    }
}

Add the dependency to your module build.gradle.kts:

dependencies {
    implementation("com.github.AndroidDeveloperLB:AutoFitTextView:XXX")
}

You can find the recent version here (replace XXX):

https://jitpack.io/#AndroidDeveloperLB/AutoFitTextView

About

A TextView that automatically fit its font and line count based on its available size and content

Resources

Readme
Apache-2.0 license
Activity

Stars

911 stars

Watchers

61 watching

Forks

152 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.