Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hanspeide/anytextview
An extension of Android's TextView, EditText and Button that let's you use the font of your choice
https://github.com/hanspeide/anytextview
Last synced: about 6 hours ago
JSON representation
An extension of Android's TextView, EditText and Button that let's you use the font of your choice
- Host: GitHub
- URL: https://github.com/hanspeide/anytextview
- Owner: hanspeide
- Created: 2013-04-05T10:48:19.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-12-03T14:23:15.000Z (almost 9 years ago)
- Last Synced: 2023-11-07T21:10:19.323Z (about 1 year ago)
- Language: Java
- Homepage:
- Size: 920 KB
- Stars: 164
- Watchers: 11
- Forks: 39
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-android-ui - https://github.com/hanspeide/anytextview
- awesome-android-ui - https://github.com/hanspeide/anytextview
README
## AnyTextView (deprecated)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-AnyTextView-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/472)
> Note: AnyTextView is no longer being maintained. I recommend replacing AnyTextView with the [Calligraphy library](https://github.com/chrisjenx/Calligraphy) instead.
Frustration arise the moment you realise that you cannot set a custom font on TextView, EditText and Button views using the ```android:typeface``` XML-attribute. AnyTextView is here to relieve your pain.
### Setup
If you're using Gradle (recommended), add the following to your build.gradle file:
```javascript
dependencies {
compile 'com.ctrlplusz.anytextview:library:1.2'
}
```If you're using Maven, add the following to your pom.xml file:
```xmlcom.ctrlplusz.anytextview
library
1.2
aar```
Alternatively, [download the .aar][1] and reference it from your project.
### How to use:
1) Copy the fonts you want to use into the _assets/fonts_ folder of your project2) Add your application namespace to the root element in the XML file that is to contain AnyTextView's, e.g
```xml```
3) Instead of using
```xml```
use
```xml
```
4) Profit!### Is your app using AnyTextView?
* Feel free to submit a pull request for this file, and add your app to this list.### Changelog
#### Version 1.2
* Project is now using Gradle instead of Maven for building
* Packaging changed to be .aar instead of .apklib
* Prepared project for release in Central
* Bumped version numbers to 21 (Lollipop)#### Version 1.1.1
* Added missing .recycle() call on TypedArray
* Bumped targetSdkVersion to 19 (KitKat)#### Version 1.1
* Made it possible to use custom typefaces in EditText's using AnyEditTextView. AnyEditTextView's shares cache with AnyTextView's.
* minSdkVersion set to 4
* No longer tries to render typefaces if code is running in a visual editor#### Version 1.0
* Use custom typefaces in TextView's using AnyTextView### License
Copyright 2015 Hans Petter EideLicensed 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.
[1]:https://oss.sonatype.org/service/local/repositories/releases/content/com/ctrlplusz/anytextview/library/1.2/library-1.2.aar