AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size.

Overview

AutoscaleEditText

AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size.

Latest Version

Download

How to use

Configuring your project dependencies

Add the library dependency to your build.gradle file.

dependencies {
    ...
    compile 'com.txusballesteros:AutoscaleEditText:1.0'
}

Adding and Customizing the View

Add the view to your xml layout file.

<com.txusballesteros.AutoscaleEditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="30sp" />

Now you personalize some of custom parameters of the view.

  • animation Duration: With this field you can establish the transformation duration in milliseconds, by default it's set to 300ms.

  • linesLimit: You can use this attribute to set the approximate lines number when the view will triggers the text scale transformation, by default it's set to 2.

  • textScale: Use this attribute to set the text scale percentage, I mean, if you have set your text size to 30sp and the text scale to 0.7 for example, when the user write a text and this overflows the line limit, the view change the textSize to 21sp or (30 * 0.7), by default it's set to 0.7 (70%).

<com.txusballesteros.AutoscaleEditText
        ...
        app:linesLimit="3"
        app:textScale="0.75"
        app:animationDuration="200" />

Motivation of the Project

I created this view as a little piece of the Redbooth App for Android.

License

Copyright Txus Ballesteros 2015 (@txusballesteros)

This file is part of some open source application.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.

Contact: Txus Ballesteros [email protected]

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

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

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

A module designed to encapsulate the use of an Android EditText field for gathering currency information from a user. Supports all ISO-3166 compliant locales/currencies.
A module designed to encapsulate the use of an Android EditText field for gathering currency information from a user. Supports all ISO-3166 compliant locales/currencies.

CurrencyEditText CurrencyEditText is an extension of Android's EditText view object. It is a module designed to provide ease-of-use when using an Edit

Form validation and feedback library for Android. Provides .setText for more than just TextView and EditText widgets. Provides easy means to validate with dependencies.
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

A simple Android Tag EditText
A simple Android Tag EditText

TagEditText A simple Android Tag EditText. Setup The easiest way to add the TagEditText library to your project is by adding it as a dependency to you

An Android App example of how to create a custom EditText using DoubleLinkedList Data Structure
An Android App example of how to create a custom EditText using DoubleLinkedList Data Structure

DoubleLinkedListEditText Library This is a library to create an EditText based on the Doubly Linked List data structure so that the user can enter cod

A custom EditText with a switchable icon which shows or hides the password
A custom EditText with a switchable icon which shows or hides the password

Deprecated This library is deprecated now as there is an official way to use the password toggle with the TextInputLayout (inside the support library

A single EditText instead of a classical form. Library that implements flavienlaurent's singleinputform
A single EditText instead of a classical form. Library that implements flavienlaurent's singleinputform

material-singleinputform A single EditText instead of a classical form. This Library is a library implementation of flavienlaurent's "Single input for

A single EditText instead of a classical form. Library that implements flavienlaurent's singleinputform
A single EditText instead of a classical form. Library that implements flavienlaurent's singleinputform

material-singleinputform A single EditText instead of a classical form. This Library is a library implementation of flavienlaurent's "Single input for

Comments
  • SwiftKey return key not working

    SwiftKey return key not working

    Hi, I'm using this library in production, and somehow SwiftKey doesn't register 'return' (new row) for this module. Could you look into this you think?

    SwiftKey version used (6.5.8.26)

    opened by pargu 0
Owner
Txus Ballesteros
Txus Ballesteros
Android form edit text is an extension of EditText that brings data validation facilities to the edittext.

Android Form EditText Android form edit text is an extension of EditText that brings data validation facilities to the edittext. Example App I built a

Andrea 1.5k Dec 14, 2022
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

Ali Muzaffar 439 Nov 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 extension for account suggestion and auto completion.

AccountAutoCompleteEditText Just a simple implementation for use of auto complete text view with device account suggestion Usage Just simply put an cu

Keishin Yokomaku 100 Feb 22, 2022
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

Evgeny Safronov 600 Nov 29, 2022
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.

Azimo Labs 161 Nov 25, 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
A TextView that automatically fit its font and line count based on its available size and content

AutoFitTextView A TextView that automatically fit its font and line count based on its available size and content This code is heavily based on this S

null 899 Jan 2, 2023
A TextView library that allows the user to increase/decrease font size with a two finger gesture by the user.

PinchZoomTextView Library This library allows you to have a TextView that will grow/shrink the font size using gestures from the user. Usage To have a

null 311 Nov 23, 2022
A editable text with a constant text/placeholder for Android.

ParkedTextView A EditText with a constant text in the end. How to use <com.goka.parkedtextview.ParkedTextView xmlns:app="http://schemas.android.co

goka 270 Nov 11, 2022