pchmn / MaterialChipsInput

Implementation of Material Design Chips component for Android
Apache License 2.0
2.63k stars 383 forks source link

NullpointerException #94

Open andazlan opened 6 years ago

andazlan commented 6 years ago

found error when i type on edittext java.lang.NullPointerException: Attempt to write to field 'int android.view.ViewGroup$MarginLayoutParams.topMargin' on a null object reference at com.pchmn.materialchips.views.FilterableListView.fadeIn(FilterableListView.java:135) at com.pchmn.materialchips.views.FilterableListView$2.onFilterComplete(FilterableListView.java:113) at android.widget.Filter$ResultsHandler.handleMessage(Filter.java:285) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

dmachacon commented 6 years ago

I encountered this when I haven't set Filterable List then I type on edit text. So what I did was set a default list for the Filterable List and refresh the list whenever the user types on the edittext.