It is a library with several commonly used Input Dialogs implementations. Implementation follows the guidelines of Google Materials Design and always with a clean and intuitive layout.
You can download the latest sample APK from this repo here: https://github.com/maiconhellmann/heins-input-dialogs/blob/master/app/app-release.apk
It's also on Google Play:
Having the sample project installed is a good way to be notified of new releases. Although Watching this repository will allow GitHub to email you whenever I publish a release.
The Gradle dependency not yet available on JCenter.
The minimum API level supported by this library is API 13 (Android 3.1 Honeycomb).
Project build.gradle:
allprojects {
repositories {
// ... other repositories here
maven { url "http://dl.bintray.com/hellmannmaicon/android" }
}
}
Module/app build.gradle:
dependencies {
// ... other dependencies here
compile 'br.com.forusers.heinsinputdialogs:input-dialogs-library:0.1.4'
}
It is an Input Dialog for Double or Long value input. This component has a double listener: OnInputDoubleListener that must be parameterized by the setPositiveButton() method.
//Create instance
CalculatorInputDialog dialog = new CalculatorInputDialog(context);
//Event listener(positive button)
dialog.setPositiveButton(new OnInputDoubleListener() {
@Override
public boolean onInputDouble(AlertDialog dialog, Double value) {
//Do something
return false;//returns if consume event
}
});
//Show dialog
dialog.show();
##HeinsInputDialog It is an Input Dialog that provides facilitators for inputting values. It provides listeners for the String, Double, and Long data types, provides method to customize keyboard type, provides getters of all components, fires posiviteButton when you click OK on a clean design...
Available listeners: OnInputDoubleListener, OnInputStringListener and OnInputLongListener.
HeinsInputDialog dialog = new HeinsInputDialog(this);
dialog.setPositiveButton(new OnInputDoubleListener() {
@Override
public boolean onInputDouble(AlertDialog dialog, Double value) {
//Do something
return false;//return if consume event
}
});
dialog.setTitle("Dialog title");
dialog.setHint("Component hint");
dialog.show();
##HeinsDatePickerDialog
It is a specialization of the DialogFragment class that implements DatePickerDialog.OnDateSetListener.
This DatePicker provides facilitators for the use of dates.
HeinsDatePickerDialog dialog = new HeinsDatePickerDialog();
dialog.setListener(new OnSelectDateListener() {
@Override
public void onSelectDate(Date date) throws Exception {
//Do somenthing
}
});
dialog.show(getSupportFragmentManager(), getClass().getSimpleName());
You can support the project and thank the author for his hard work.
PayPal
Want to contribute? You are welcome!
Note that all pull request should go to dev
branch.
- Maicon Hellmann - maiconhellmann@gmail.com