An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# android-prefix-textView and editView
EditText and TextView with support for non editable prefix and image.
![Sample Screenshot](https://github.com/maze1377/android-prefix-edittext-textview/raw/master/screenshots/sample.png)

#get more performance and low memory
![Sample Details](https://github.com/maze1377/android-prefix-edittext-textview/raw/master/screenshots/details.jpg)

## 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