public SoundbitesAdapter(Context context, View noSoundbites) { this.context = context; this.soundbites = SoundbitesManager.get().getAllSoundbites(); this.noSoundbites = noSoundbites; this.favoritesMode = false; this.yellow = context.getResources().getColor(R.color.yellow); this.darkGray = context.getResources().getColor(R.color.dark_gray); toggleNoSoundbites(); }
public void filterSoundbites(String searchInput, boolean favoritesMode) { this.favoritesMode = favoritesMode; soundbites = SoundbitesManager.get().getSoundbiteMatches(searchInput, favoritesMode); toggleNoSoundbites(); notifyDataSetChanged(); }