use of org.wikipedia.analytics.OfflineLibraryFunnel in project apps-android-wikipedia by wikimedia.
the class LocalCompilationsFragment method onCreateView.
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
View view = inflater.inflate(R.layout.fragment_local_compilations, container, false);
unbinder = ButterKnife.bind(this, view);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
recyclerView.setAdapter(adapter);
recyclerView.addItemDecoration(new DrawableItemDecoration(getContext(), R.attr.list_separator_drawable));
((SimpleItemAnimator) recyclerView.getItemAnimator()).setSupportsChangeAnimations(false);
errorView.setBackClickListener(v -> getActivity().finish());
emptyDescription.setMovementMethod(LinkMovementMethod.getInstance());
emptyDescription.setText(StringUtil.fromHtml(getString(R.string.offline_library_empty_description_sideload)));
RichTextUtil.removeUnderlinesFromLinks(emptyDescription);
packsHint.setMovementMethod(LinkMovementMethod.getInstance());
packsHint.setText(StringUtil.fromHtml(getString(R.string.offline_library_packs_hint)));
RichTextUtil.removeUnderlinesFromLinks(packsHint);
dataUsageHint.setMovementMethod(new LinkMovementMethodExt((url, titleString) -> {
if (url.equals(UriUtil.LOCAL_URL_SETTINGS)) {
startActivity(SettingsActivity.newIntent(getContext()));
}
}));
dataUsageHint.setText(StringUtil.fromHtml(getString(R.string.offline_library_data_usage_hint)));
RichTextUtil.removeUnderlinesFromLinks(dataUsageHint);
funnel = new OfflineLibraryFunnel(WikipediaApp.getInstance(), 0);
return view;
}
Aggregations