edwnmrtnz / awesomeforms

Awesome forms using material component!
3 stars 0 forks source link

awesomeforms

Awesome forms using material component!

Sample

Sample

Prerequisites

Add this in your root build.gradle file (not your module build.gradle file):

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Dependency

Add this to your module's build.gradle file (make sure the version matches the JitPack badge above):

dependencies {
    implementation 'com.github.edwnmrtnz:awesomeforms:Tag'
}

Usage

You can use the following extra attributes for styling aside from the defaults offered by standard edittext.

<attr name="fieldLabel"/>
<attr name="assistiveText"/>
<attr name="fieldLabelTextColor"/>
<attr name="assistiveTextColor"/>
<attr name="placeholderText"/>
<attr name="placeholderTextColor"/>
<attr name="fieldStyle"/>

There are four types of edit text you can use

AwesomeFormNormalEditText
AwesomeFormPasswordEditText
AwesomeFormPhonePrefixEditText
AwesomeFormSpinnerEditText

Using theme is pretty simple. You can see the sample inside app module.

Note

You may override the following colors

    <color name="AwesomeForm_hintColor">#adadad</color>
    <color name="AwesomeForm_textColor">#333333</color>
    <color name="AwesomeForm_color_cursor">#333333</color>

    <color name="AwesomeForm_strokeColor">#ebebeb</color>
    <color name="AwesomeForm_color_error">#ff2a4e</color>
    <color name="AwesomeForm_focused_color">@color/colorPrimary</color>