- Notifications
You must be signed in to change notification settings - Fork4
EditText with support for non editable prefix and suffix.
License
NotificationsYou must be signed in to change notification settings
tobiasschuerg/android-prefix-suffix-edit-text
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
EditText with support for non editable prefix and suffix.
Either directly via xml:
<com.tobiasschuerg.prefixsuffix.PrefixSuffixEditTextandroid:layout_width="match_parent"android:layout_height="wrap_content"android:inputType="numberDecimal"android:text="24"app:prefix="Age:"app:suffix=" years"android:textColorHint="@color/colorPrimary"/>
or programmatically in code:
// just a prefix:edit_text_dollar.prefix="$"// suffix with coloredit_text_euro.suffix="€"edit_text_euro.setHintTextColor(Color.GREEN)// both, prefix and suffixedit_text_age.prefix="Age:"edit_text_age.suffix=" years"
Seesample code.
The color can be set via xml:
android:textColorHint="@color/colorPrimary"
and programmatically
prefixSuffixView.setHintTextColor(Color.GREEN)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.tobiasschuerg:android-prefix-suffix-edit-text:version'}Replaceversion by thelatest release.
About
EditText with support for non editable prefix and suffix.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Contributors2
Uh oh!
There was an error while loading.Please reload this page.
