Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/txusballesteros/AutosizeEditText
AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size.
https://github.com/txusballesteros/AutosizeEditText
Last synced: about 6 hours ago
JSON representation
AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size.
- Host: GitHub
- URL: https://github.com/txusballesteros/AutosizeEditText
- Owner: txusballesteros
- Created: 2015-10-15T20:20:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-06T20:02:50.000Z (over 7 years ago)
- Last Synced: 2024-11-12T23:42:15.427Z (7 days ago)
- Language: Java
- Homepage:
- Size: 2.37 MB
- Stars: 361
- Watchers: 11
- Forks: 46
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-android-ui - https://github.com/txusballesteros/AutosizeEditText
- awesome-android-ui - https://github.com/txusballesteros/AutosizeEditText
README
AutoscaleEditText
=================![](assets/demo.gif)
AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size.
## Latest Version
[![Download](https://api.bintray.com/packages/txusballesteros/maven/AutoscaleEditText/images/download.svg) ](https://bintray.com/txusballesteros/maven/AutoscaleEditText/_latestVersion) ![](https://img.shields.io/badge/platform-android-green.svg)
## How to use
### Configuring your project dependencies
Add the library dependency to your build.gradle file.
```groovy
dependencies {
...
compile 'com.txusballesteros:AutoscaleEditText:1.0'
}
```### Adding and Customizing the View
Add the view to your xml layout file.
```xml
```
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%).
```xml
```
## Motivation of the Project
I created this view as a little piece of the [Redbooth](https://redbooth.com/) 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 athttp://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