@@ -143,7 +143,7 @@ public void onItemLongClick(View view, int position) {
143143 public void onClick (View view ) {
144144 String getAssetsValue = "" ;
145145 String assetValue = "" ;
146- ArrayList <String > temp_string_list = new ArrayList <>();
146+ ArrayList <String > temp_string_list = new ArrayList <>();
147147 if (multiList != null && multiList .size () > 0 ) {
148148 for (int i = 0 ; i < multiList .size (); i ++) {
149149 if (multiList .get (i ).getCheck ()) {
@@ -152,7 +152,9 @@ public void onClick(View view) {
152152 assetValue = getAssetsValue .substring (0 , getAssetsValue .length () - 1 );
153153 }
154154 }
155- multiSelectionListener .onMultiDialogItemsSelected (assetValue , tag ,temp_string_list );
155+ multiSelectionListener .onMultiDialogItemsSelected (assetValue , tag , temp_string_list );
156+ } else {
157+ multiSelectionListener .onMultiDialogError ("List is null or empty" , tag );
156158 }
157159
158160 dialog .dismiss ();
@@ -191,11 +193,11 @@ public void onClick(View view) {
191193//// });
192194//
193195 if (list != null && list .size () > 0 ) {
194- dialogAdapter = new MulitpleSelectionAdapter (multiList ,currentField ,context ,headerColor );
196+ dialogAdapter = new MulitpleSelectionAdapter (multiList , currentField , context , headerColor );
195197 recyclerView .setAdapter (dialogAdapter );
196198 dialog .show ();
197199 } else {
198- Toast . makeText ( context , "List is empty" , Toast . LENGTH_SHORT ). show ( );
200+ multiSelectionListener . onMultiDialogError ( "List is null or empty" , tag );
199201 }
200202
201203 dialog .show ();
0 commit comments