https://github.com/maze1377/android-prefix-edittext-textview
Adding a prefix and img to an EditText and Textview
https://github.com/maze1377/android-prefix-edittext-textview
android android-library customview edittext prefix textview
Last synced: 12 months ago
JSON representation
Adding a prefix and img to an EditText and Textview
- Host: GitHub
- URL: https://github.com/maze1377/android-prefix-edittext-textview
- Owner: maze1377
- Created: 2019-09-29T16:37:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-26T07:06:54.000Z (over 6 years ago)
- Last Synced: 2025-04-14T05:49:17.873Z (about 1 year ago)
- Topics: android, android-library, customview, edittext, prefix, textview
- Language: Kotlin
- Homepage:
- Size: 372 KB
- Stars: 11
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# android-prefix-textView and editView
EditText and TextView with support for non editable prefix and image.

#get more performance and low memory

## Howto?
Either directly via xml:
```xml
```
or programmatically in code:
```kotlin
### Setting the prefix
edit_text.prefix = "$"
### Setting the color
edit_text.setHintTextColor(Color.GREEN)
### Setting the drawable
edit_text.drawable = avatar
```
See [sample code](https://github.com/maze1377/android-prefix-edittext-textview/blob/master/sample/src/main/java/com/maze/sample/MainActivity.kt).
## Add as Library
Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
```
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
Step 2. Add the dependency
```
dependencies {
implementation 'com.github.maze1377:android-prefix-edittext-textview:lastVerstion'
}
```
current lastVerstion=1.1.1