Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interference with Filterable #576

Open
GCIotron opened this issue Feb 29, 2024 · 2 comments
Open

Interference with Filterable #576

GCIotron opened this issue Feb 29, 2024 · 2 comments

Comments

@GCIotron
Copy link

Hello

I'm using latest version of the library for an android application written in java

I have Java VERSION_1_8 in compile option, Sdk 34
and using androidx.legacy:legacy-support-v4:1.0.0

I describe my issue with the library:

In my application I have an ArrayAdapter that implements Filterable.

Only after firing onMessageReceived of the Mqtt Client, i need to put some data in the arrayAdapter and
filter it to show the results based on some criteria....

when the code calls the getFilter() method for the ArrayAdapter the code stops to execute when creating new Filter to return by the method and i got no logcat for this issue

public class MyArrayAdapter extends RecyclerView.Adapter<MyArrayAdapter.MyViewHolder> implements Filterable {

[...]
public Filter getFilter() {

    return new Filter() { <---- excactly here

[...]

This behavior is directly connected using the library from version 4.1 to version 4.2.3 and it not happend before the fire of onMessageReceived because the code calls the getFilter() method before also, and the getFilter() method works perfectly.

Using 4.0 version of the library I got no problems.

Thanks to all if you could find the reason of this issue.

@hannesa2
Copy link
Owner

It's hard to understand what's exactly happen, without running code which demonstrate the issue. That's why I can only guess what's wrong here.

The first shot, is to get rid of VERSION_1_8 and using Java 17. Please give it a try.

@GCIotron
Copy link
Author

It's hard to understand what's exactly happen, without running code which demonstrate the issue. That's why I can only guess what's wrong here.

The first shot, is to get rid of VERSION_1_8 and using Java 17. Please give it a try.

Hello, i've changed to Java 17, using library version 4.1
but the behavior didn't change. :(
I will try to investigate making a small example to eventually share with you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants