You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable Selections features. Now easy with SelectionDialog android library. You can now enable Single selection and Multiple selection features in your app easily.
7
9
@@ -22,7 +24,7 @@ Enable Selections features. Now easy with SelectionDialog android library. You c
Create class of SingleSelectionDialog for using the Single Selection.
42
+
Create object of SingleSelectionDialog with Builder for using the Single Selection.
41
43
42
44
43
45
44
-
// First parameter you need to pass is this means you need to implement a SingleSelectionListener in your activity then activity context and last is TAG.
45
-
46
+
//First parameter need to pass is current context and then TAG. TAG is for determine if you are using dialog multiple times.
47
+
SingleSelectionDialog singleSelectionDialog = new SingleSelectionDialog.Builder(context, "TEST")
48
+
.setTitle("Select Number")
49
+
.setContent(stringArrayList) // Set ArrayList you want to show.
Inherit SingleSelectionListener listener in your activity like this.
69
-
70
-
public class MainActivity extends AppCompatActivity implements SingleSelectionListener
71
-
**Step 5**
72
-
Get value, positions, TAG and error from dialog.
73
-
74
-
72
+
73
+
**Step 3**
74
+
Set Default value or Current value to Dialog.
75
75
76
-
@Override
77
-
public void onDialogItemSelected(String s, int position, String tag) {
78
-
79
-
}
80
-
81
-
@Override
82
-
public void onDialogError(String error, String tag) {
83
-
84
-
}
76
+
singleSelectionDialog.setSelectedField(value); //Default value must be of String type.
85
77
86
78
87
79
## How do I use Multi Selection Dialog?
@@ -92,53 +84,38 @@ Get value, positions, TAG and error from dialog.
92
84
Using MultiSelection is also not that tough.
93
85
94
86
**Step 1**
95
-
Create class of MultiSelectionDialog for using the Multi Selection.
87
+
Create object of MultiSelectionDialog with Builder for using the Multiple Selection.
96
88
97
89
98
90
99
-
// First parameter you need to pass is this means you need to implement a MultiSelectionListenerin your activity then activity context and last is TAG.
100
-
101
-
102
-
MultiSelectionDialog multiSelectionDialog = new MultiSelectionDialog(this, context, "TAG");
103
-
104
-
//Then you need to the ArrayList which you want to show. ArrayList must be of String type.
105
-
multiSelectionDialog.setContent(stringArrayList);
106
-
107
-
108
-
**Step 2**
109
-
Add extra features to your dialog.
110
-
91
+
//First parameter need to pass is current context and then TAG. TAG is for determine if you are using dialog multiple times.
92
+
MultiSelectionDialog multiSelectionDialog = new MultiSelectionDialog.Builder(context, "TEST")
0 commit comments