private void initViews() { adapter = new YoutubeVideoArrayAdapter( controller, activity, R.layout.list_item_main_youtube_video, new ArrayList<YoutubeVideo>()); gridView.setAdapter(adapter); gridView.setOnScrollListener(new PauseOnScrollListener(adapter.getImageLoader(), true, false)); controller.loadYoutubeVideos(); }
@Override public void onUpdateView(ArrayList<YoutubeVideo> youtubeVideos) { adapter.clear(); adapter.addAll(youtubeVideos); adapter.getFavoriteYoutubeVideos(this); }
@Override public void onPageLoaded(ArrayList<YoutubeVideo> newYoutubeVideos) { adapter.addAll(newYoutubeVideos); }
public void searchFilter(CharSequence s) { adapter.getFilter().filter(s); }