pratikbutani / MultiSelectSpinner

Android - Select Multiple Items from Spinner with Filtration.
http://pratikbutani.github.io/MultiSelectSpinner/
GNU General Public License v3.0
253 stars 125 forks source link

why Pressing BackButton calls onItemsSelected in SingleSpinnerSearch? #72

Closed Mohammad-Adam closed 4 years ago

Mohammad-Adam commented 4 years ago

here is my full code:

posts_fab?.setOnClickListener {
            SingleSpinnerSearch(requireContext()).apply {
                setItems(items, object : SingleSpinnerListener {
                    override fun onItemsSelected(selectedItem: KeyPairBoolData?) {
                             // this is called every time the back button pressed
                    }
                    override fun onClear() {}
                })
                isColorseparation = true
                setEmptyTitle("Empty")
                setSearchHint("Select or Search")
                performClick()
            }
        }

and also how to not show the keyboard when the dialog shows? thanks;

pratikbutani commented 4 years ago

Hello,

Because of this line you are getting this problem.

If you can set it my yourself then it will be good otherwise I will update in next update.

Thank you.

Mohammad-Adam commented 4 years ago

@pratikbutani thank you for your good work; I'm about to publish the app so I'd appreciate it if you speed up the work; also how to stop the keyboard from showing when the dialog shows?

pratikbutani commented 4 years ago

@pratikbutani thank you for your good work; I'm about to publish the app so I'd appreciate it if you speed up the work; also how to stop the keyboard from showing when the dialog shows?

You can remove searchView , because of SearchView you are getting up that keyboard. Or If you want SearchView as it is then Write some code to hide keyboard after showing the dialog.

Mohammad-Adam commented 4 years ago

1- if the selected item is not null then I get some text in white color like in the picture below; Screenshot_20200910-082349 2- the text is single line! how to make it multiLine? you should provide more customization options

pratikbutani commented 4 years ago

1- if the selected item is not null then I get some text in white color like in the picture below; Screenshot_20200910-082349 2- the text is single line! how to make it multiLine? you should provide more customization options

For Point - 1, It will be solved soon. For Point - 2, You have to download the whole library and change the row layout of the adapter.

pratikbutani commented 4 years ago

@EngDjango Please check the updated library. Point - 1 issue solved.

Mohammad-Adam commented 4 years ago

@pratikbutani man I'm using the object parameter you removed from KeyPairBoolData can you get it back?

You have to download the whole library and change the row layout of the adapter

I don't know how to do this

pratikbutani commented 4 years ago

KeyPairBoolData

Added Object Param.

Mohammad-Adam commented 4 years ago

@pratikbutani thank you; can you plz provide options to override android:singleLine="true" in item_listview_single.xml and <requestFocus /> in alert_dialog_listview_search.xml ?

pratikbutani commented 4 years ago

It will be not useful to all, we need to think commonly. If you want to change anything in the layout then please download the project and add library folder in your project. It will be very helpful to you.