Coder Social home page Coder Social logo

searchablespinner's People

Contributors

matthewtrout avatar miteshpithadiya avatar walterwhites avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

searchablespinner's Issues

Library doesn't support Custom Filter for ArrayAdapter

Hello, first for all, sorry for my bad English.

Ok, straight to the point. The type of my adapter for the spinner is a project class (e.g. ArrayAdapter), witch contains two attributes, id (int) and name (String). So I implemented a subclass of ArrayAdapter for a custom filter, because the default filter isn't useful for me, since in my native language (Spanish), there are words with special characters and the filter only works when the text to search matches the beginning of the word.

I've been researched your source code and I realized that ListAdapter for inner ListView of search dialog is built with a generic ArrayAdapter created from the List of items of Dialog class. This causes the filter of my custom Adapter not recognized and the adapter tooks the default instead.

I wish that ListAdapter of inner ListView is created from the custom Adapter in the method setAdapter of class SearchableSpinner

I wait for your early reply. I'd be really useful for me.
Thanks.

using Spinner in Scroll-able View/layout

Hello,
I would like to mention another thing related to searchable spinner.

Please note that , if you use this spinner in a scroll view or scroll-able layout with lot of other fields in a layout then it will be automatically called/invoked which will lead towards Bad User Experience , Kindly have a look at that to Fix this nicely managed spinner.

Appreciated your support as always.

Kind Regards,

Abid

Exception in ArrayAdapter "NotSerializableException"

Fatal Exception: java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.toptoche.searchablespinnerlibrary.SearchableSpinner)
at android.os.Parcel.writeSerializable(Parcel.java:1399)
at android.os.Parcel.writeValue(Parcel.java:1346)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:649)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1313)
at android.os.Bundle.writeToParcel(Bundle.java:1034)
at android.os.Parcel.writeBundle(Parcel.java:674)
at android.app.FragmentState.writeToParcel(Fragment.java:144)
at android.os.Parcel.writeTypedArray(Parcel.java:1202)
at android.app.FragmentManagerState.writeToParcel(FragmentManager.java:381)
at android.os.Parcel.writeParcelable(Parcel.java:1368)
at android.os.Parcel.writeValue(Parcel.java:1273)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:649)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1313)
at android.os.Bundle.writeToParcel(Bundle.java:1034)
at android.os.Parcel.writeBundle(Parcel.java:674)
at android.app.ActivityManagerProxy.activityStopped(ActivityManagerNative.java:3031)
at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3569)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5653)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by java.io.NotSerializableException: android.widget.ArrayAdapter
at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1344)
at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1651)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1497)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1461)
at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:959)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:360)
at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1054)
at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1384)
at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1651)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1497)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1461)
at android.os.Parcel.writeSerializable(Parcel.java:1394)
at android.os.Parcel.writeValue(Parcel.java:1346)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:649)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1313)
at android.os.Bundle.writeToParcel(Bundle.java:1034)
at android.os.Parcel.writeBundle(Parcel.java:674)
at android.app.FragmentState.writeToParcel(Fragment.java:144)
at android.os.Parcel.writeTypedArray(Parcel.java:1202)
at android.app.FragmentManagerState.writeToParcel(FragmentManager.java:381)
at android.os.Parcel.writeParcelable(Parcel.java:1368)
at android.os.Parcel.writeValue(Parcel.java:1273)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:649)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1313)
at android.os.Bundle.writeToParcel(Bundle.java:1034)
at android.os.Parcel.writeBundle(Parcel.java:674)
at android.app.ActivityManagerProxy.activityStopped(ActivityManagerNative.java:3031)
at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3569)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5653)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755

Make utility for custom adapters.

Hi,
There is only default adapter used in the custom spinner, why dont we use the custom adapter with defined object and resource. (eg. Custom array object, arraylist etc...)

How to Populate Particular Column in Spinner using Database

Hello , I am using Database where i Have Five Columns in the Table . That Table Headers are
"Emp ID, Emp Name , Emp Add, Emp City, Emp Phone" From All This Columns I want to Only Show the details of "Emp City" in the spinner. Please Help me with Code How i it will work and how i can achieve it ?

Hardcoded Strings

Is there any way to change the title and close button text in the dialog spinner for multilanguage support?

Fragment is java.lang.IllegalStateException: Fragment already added

Hi there,
could you add a method to check if the fragment is already added? This is a small issue, but it can be handled easy.
I'm getting this error, on fast double click...
java.lang.IllegalStateException: Fragment already added: SearchableListDialog{10fe7cc4 #0 TAG}

Textbox upon dialoginterface

Hi,
First thanks for this library. Is there any way to hide black text bar upon the dialog interface which pops up while typing to seachview?

Spinner SetText

When we select any value from the spinner the selected value should be displayed in the Edit Text ?

How it work ??

Spinner not showing when set a background

when i add a background to spinner , it disappears.

<com.toptoche.searchablespinnerlibrary.SearchableSpinner
    android:id="@+id/spinner"
    android:layout_width=wrap_content"
    android:layout_height="wrap_content"
    android:entries="@array/planets"
    android:background="@color/colorAccent"
    app:hintText="SEKECCTTT"/>

On multiple times click on spinner the app crash

Hi Mitesh,
On multiple times click on spinner the app crash.
In SearchableSpinner.java line number 91 change _searchableListDialog.show(scanForActivity(_context).getFragmentManager(), "TAG"); code to

if(!_searchableListDialog.isAdded()) {
_searchableListDialog.show(scanForActivity(_context).getFragmentManager(), "TAG");
}

Spinner Crashed!!!!

When I click the SearchableSinner throw Exception

java.lang.IllegalStateException: Fragment already added: SearchableListDialog{ad4f6610 #0 TAG}
at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1133)
at android.app.BackStackRecord.run(BackStackRecord.java:618)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:443)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)

[Question] Search Function

Assume I have 2 texts inside the spinner: "Good Morning" and "Hello World".
When I search with starting 'g' it works right. but when I search with starting 'w' it doesn't show anything. Am I wrong or all of you have this problem?

Sorry for bad English :)

Open searchable spinner dialog probrammatically

when i do performClick on spinner it doens't show the dialog but opens the normal spinner, the dialog cannot be retrieved in no way from the SearchableSpinner.java class, there is a possibility to provide a method getDialog() for operating on this object ?

Realm exception during performFiltering()

I get this error when trying to filter the spinner.

An exception occured during performFiltering()!
          java.lang.IllegalStateException: Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created.

And this one

java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference

I'm using realm database and ArrayAdapter. I hope this error gets resolved soon.

How to change dialog colors

Hi
Firstly thanks for a useful library...
Can you please help me out in how can i customize the colors or style for alert dialog popup if its not possible can you please add the functionality to provide for the same
Thanks

[Feature Request ] LinkedHashMap<String, String> support

Hello Mitesh Pithadiya,

I hope you are doing great, I am using your searchable spinner in my project , I have a requirement to send selected item's/Value's Key to the server because in my case spinner will be populated with a service call that will have key and value pairs as a data, I have decided to use a Map like this to hold key and value. for Exaample
Private LinkedHashMap<String, String> mapData = new LinkedHashMap<String, String>();
mapData.put("shamu", "Nexus 6");
.
.
.
.
and so on .

and mapData will be used in spinner adapter.

My concern is to have this support in searchable spinner if possible or may be another version of spinner to incorporate this functionality. or if you have any other suggestions to incorporate this problem pleas let me know.

Kindly acknowledge,

Muhammad Abid

getDropDownView Not Triggered?

I am using a custom adapter which extends ArrayAdapter and overrides both getDropDownView and getView. My intention is to change the layout of items ONLY when they are displayed in the dropdown menu, however, it seems that only getView is triggered, and not getDropDownView.

Is this by any chance an issue with SearchableSpinner?

On Lock its get crashed

Hello,

I was using your library in my project. After opening the spinner my phone got locked and on console "java.io.NotSerializableException: in searchable spinner" this error was printed and my appilication was crashed.

Can you please solve this issue asap.

Error when clicking Home button or Overview button

I'm using v. 1.3.1 while the spinner is opened and I click on Home button or Overview button, the app crashes. The following error showed up:

java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.toptoche.searchablespinnerlibrary.SearchableSpinner)

Thanks for this great library.

Query is getting printed.

Hello,

I implemented this library in my project but when i type any query in searchview of the dialog box, Its getting printed above the search view in an transparent layout i tried to find out the issue but i got nothing.
Can you tell me how to remove that transparent layout.

I have attached the screen shot bellow.
device-2016-06-06-182713

setSelection method not working when used in fragment

I have used SearchableSpinner in a fragment . It return the selected item value but does not set to spinner
Also used onSearchableItemClicked method explicitly but its not working . I guess setSelection method not working

Back press error

When I open the search spinner and click on "back press" on my phone I have an io serializable exception ... Please help me to fix it ๐Ÿ‘

Crash on orientation change

When dialg is opened and orientation is changed after clicking on item its getting crashed i think there is an issue with the interface.

how to set the tittle in the layout xml

Hi,

I would like to set the title in the layout because I am loading data strings.XML using android:entries="@array hence i would like to understand how doi set title to this spinner in layout

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.