Skip to content

otmaneTheDev/ZodiacEditText

Repository files navigation

ZodiacEditText

Inspiration

This project was inspired in https://dribbble.com/shots/9110546-Birthday-input-field component design.

Sample project

View the sample app's source code here

Setup

Add the JitPack repository to your project level build.gradle:

allprojects {
 repositories {
    google()
    jcenter()
    maven { url "https://jitpack.io" }
 }
}

Add ZodiacEditText to your app build.gradle:

dependencies {
    implementation 'com.github.otmaneTheDev:ZodiacEditText:<latest-version>'
}

Usage

Add ZodiacEditText to your XML like any other view.

    <otmanethedev.zodiacedittext.ZodiacEditText
        android:id="@+id/zodiacEditText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/margin_default"
        app:defaultColor="@color/customColorBlue"
        app:errorColor="@color/customColorRed"
        app:hintColor="@color/customColorGrey"
        app:textColor="@color/customColorBlack" />

Set ZodiacEditText DateChangedListener.

        zodiacEditText.setDateChangedListener(object :ZodiacEditText.DateChangedListener{
            override fun onDateChanged(date: Date) {
                // Do your stuff here
            }
        })

Contributing

Found a bug? feel free to fix it and send a pull request