heins-input-dialogs
It is a library with several commonly used Input Dialogs implementations. Impelments follow the guidelines of Google Materials Design and always with a clean and intuitive layout.
Sample Project
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.
Gradle Dependency
Repository
The Gradle dependency not yet available on JCenter.
The minimum API level supported by this library is API 13 (Android 3.1 Honeycomb).
Dependency
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'
}
Calculator Input Dialog
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.
Usage
//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...
Usage
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.
Usage
HeinsDatePickerDialog dialog = new HeinsDatePickerDialog();
dialog.setListener(new OnSelectDateListener() {
@Override
public void onSelectDate(Date date) throws Exception {
//Do somenthing
}
}
);
dialog.show(getSupportFragmentManager(), getClass().getSimpleName());
Donation
You can support the project and thank the author for his hard work.
PayPal
Contributing
Want to contribute? You are welcome! Note that all pull request should go to dev
branch.
Developed By
- Maicon Hellmann - [email protected]