@Override @UiThread @IgnoredWhenDetached public void showAllApps(List<Application> allApps) { apps.setAdapter(appsAdapter(allApps)); apps.setLayoutManager(new LinearLayoutManager(getActivity())); // ItemClickSupport.addTo(apps) // .setOnItemClickListener( // (view, position, id) -> appSelected(appsAdapter.getItem(position))); }
@UiThread @IgnoredWhenDetached protected void updateTags(List<Tag> tags) { tagContainer.removeAllViews(); for (Tag tag : tags) { TagView tagView = TagView_.build(getActivity()); tagView.setTag(tag); if (tag.equals(Tag.ALL)) { tagView.setAllTags(tags.subList(1,tags.size())); } tagView.setSelected(tag.equals(filter.getTag())); tagView.setOnClickListener(this); tagContainer.addView(tagView); } }
@UiThread @IgnoredWhenDetached protected void updateSources(List<Source> sources, List<Tag> tags) { sourceContainer.removeAllViews(); for (Source source : sources) { SourceView sourceView = SourceView_.build(getActivity()); sourceView.setSource(source, getTagsOfSource(source, tags)); sourceView.setSelected(source.equals(filter.getSource())); sourceView.setOnClickListener(this); sourceContainer.addView(sourceView); } }
@Override @UiThread @IgnoredWhenDetached public void showAppLocked() { appsAdapter.notifyDataSetChanged(); }
@Override @UiThread @IgnoredWhenDetached public void showAppUnlocked() { appsAdapter.notifyDataSetChanged(); }
@IgnoredWhenDetached @UiThread void showMsg(String msg){ Toast.makeText(getContext(), msg, Toast.LENGTH_SHORT).show(); }