Skip to content

Alert Dialog Box library to create checkboxes or RadioGroup with a list of array in one line

License

Notifications You must be signed in to change notification settings

Tobibur/PrintArray

Repository files navigation

PrintArray

Android Library for Printing arrays in AlertDialog interface with checkbox.

Sreenshots:

How to:

To get a Git project into your build:

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

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

Step 2. Add the dependency

dependencies {
	implementation 'com.github.Tobibur:PrintArray:v1.3.0'
}

Usage:

1. Set title of the Dialog Box (Optional)

PrintArray.setBoxTitle("Your String here for title");

2. Call this method below Onclick of a button :

//For MultiChoice Checkbox Dialog
PrintArray.diaCheckBox(Button button, String[] listItems, Context context);
//For SingleChoice RadioButton Dialog
PrintArray.diaRadioBox(Button button, String[] listItems, Context context);

3. For custom OnClick listener for positive button use :

// For Checkbox Dialog
PrintArray.diaCheckBox(Button button, String[] listItems, Context context,
			new Onclicklistener(...));
// and for RadioButton Dialog
PrintArray.diaCheckBox(Button button, String[] listItems, Context context,
			new Onclicklistener(...));

License & Copyright

Licensed under the MIT License.