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
It looks like FilberableList is mandatory to specify before to use component (version 1.0.5)
`public class MainAppActivity extends AppCompatActivity {
private ChipsInput chipsInput;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_app);
this.chipsInput = (ChipsInput) findViewById(R.id.chips_input);
// without the next line of code application will crushed with NPE
chipsInput.setFilterableList(new ArrayList<ChipInterface>());
}
@Override
protected void onResume() {
super.onResume();
chipsInput.setFilterableList(new ArrayList<ChipInterface>());
chipsInput.addChip("Test", null);
chipsInput.addChipsListener(new ChipsInput.ChipsListener() {
@Override
public void onChipAdded(ChipInterface chipInterface, int i) {}
@Override
public void onChipRemoved(ChipInterface chipInterface, int i) {}
@Override
public void onTextChanged(CharSequence charSequence) {
String text = charSequence.toString();
if (text.endsWith(" ")) {
chipsInput.addChip(text, null);
}
}
});
}
}`
NPE stack trace:
E/AndroidRuntime: FATAL EXCEPTION: main java.lang.NullPointerException at com.pchmn.materialchips.views.ChipsInputEditText.isFilterableListVisible(ChipsInputEditText.java:21) at com.pchmn.materialchips.util.MyWindowCallback.dispatchTouchEvent(MyWindowCallback.java:60) at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1873) at android.view.View.dispatchPointerEvent(View.java:7307) at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3174) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3119) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4155) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4134) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4226) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:171) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:125) at android.os.Looper.loop(Looper.java:124) at android.app.ActivityThread.main(ActivityThread.java:4745) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(Native Method)
The text was updated successfully, but these errors were encountered:
It looks like FilberableList is mandatory to specify before to use component (version 1.0.5)
`public class MainAppActivity extends AppCompatActivity {
private ChipsInput chipsInput;
}`
NPE stack trace:
E/AndroidRuntime: FATAL EXCEPTION: main java.lang.NullPointerException at com.pchmn.materialchips.views.ChipsInputEditText.isFilterableListVisible(ChipsInputEditText.java:21) at com.pchmn.materialchips.util.MyWindowCallback.dispatchTouchEvent(MyWindowCallback.java:60) at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1873) at android.view.View.dispatchPointerEvent(View.java:7307) at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3174) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3119) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4155) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4134) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4226) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:171) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:125) at android.os.Looper.loop(Looper.java:124) at android.app.ActivityThread.main(ActivityThread.java:4745) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(Native Method)
The text was updated successfully, but these errors were encountered: