FavoritesFragment problem solved with onQueryTextChangeListener.

Solved the problem where listfragment was displaying double the number
of items that originally present in the list. Also, solved the problem
where onQueryTextChangeListener was giving null pointer exception when
adapter.getFilter() was accesed. Its still giving problems, but I am
handling nullpointerexception within code.