This project was inspired in https://dribbble.com/shots/9110546-Birthday-input-field component design.
View the sample app's source code here
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>'
}
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
}
})
Found a bug? feel free to fix it and send a pull request