I have the following situation in my android app.
- I have an application that retrieves messages from mailboxes, sends items and drafts based on search keywords. I use for this, selecting cursors for each manually based on the selection by the user, and then filling them in the user data storage object. Filter the results based on the given keywords, and then manually visualize the view with the relevant data.
Someone suggested that I should use a custom cursor adapter to bind the view and cursor data. So I tried to do it. Now I do the following:
- Get separate cursors for incoming, sent items and drafts. Merge them into one using the Merge cursor, and then pass it back to my CursorAdapter implementation.
- Now, where and how can I filter cursor data based on keywords; because now the binding guarantees that they will be directly displayed for viewing in the list. In addition, some operations after receipt, such as selecting the contact of the sender, and all this will be what I do not want to go to the adapter. If I do all this processing in the adapter; it will be hard and ugly.
How could I better configure it so that it is carried out, and responsibilities are distributed and distributed.
Any ideas would be helpful.