Problems with Adapter in SearchView

0

Well, the business is as follows. In my app, when you open it you have an ActivityPrincipal, in this Activity I have a ViewPagerAdapter that shows three Tabs (Let's call them tab-1, tab-2 and tab-3, each with its fragment). < Each tab loads a list using RecycleView. The data from these lists comes from my webservice.
So far everything works perfectly.

In the last tab (Aba-3) is where I enable in my toolbar (which is working as actionBar) search using SearchView.
ActivitySearch, responsible for listing search data, is basically the same RecycleView and adapter that used in Aba-3, and that's where my problem starts. I'll explain.

When I click on the search icon, in my toolbar (which is acting as an actionBar), it opens a field in the actionBar itself so I can type what it will be search in. As soon as I type and press Enter using the Genymotion emulator), again a search to my webservice is done and returns a list. That list is passed to the adapter of my RecycleView, which is in charge of displaying the items on the screen. What happens is that my WebService returns a JSON with two objects, but RecicleView only shows the last one.
That is, if I do a search that returns 10 objects, my RecicleView only shows 9, always ignoring the first one returned. Remember that the same list works correctly when I go to Aba-3.

Does anyone know where to start?

    
asked by anonymous 20.07.2015 / 20:08

0 answers