Search in sources :

Example 1 with ReadingListsFunnel

use of org.wikipedia.analytics.ReadingListsFunnel in project apps-android-wikipedia by wikimedia.

the class AddToReadingListDialog method onCreateView.

@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.dialog_add_to_reading_list, container);
    listsContainer = rootView.findViewById(R.id.lists_container);
    onboardingContainer = rootView.findViewById(R.id.onboarding_container);
    onboardingButton = rootView.findViewById(R.id.onboarding_button);
    checkAndShowOnboarding();
    RecyclerView readingListView = rootView.findViewById(R.id.list_of_lists);
    readingListView.setLayoutManager(new LinearLayoutManager(getActivity()));
    readingListView.setAdapter(adapter);
    View createButton = rootView.findViewById(R.id.create_button);
    createButton.setOnClickListener(createClickListener);
    if (savedInstanceState == null) {
        // Log a click event, but only the first time the dialog is shown.
        new ReadingListsFunnel().logAddClick(invokeSource);
    }
    updateLists();
    return rootView;
}
Also used : ReadingListsFunnel(org.wikipedia.analytics.ReadingListsFunnel) RecyclerView(android.support.v7.widget.RecyclerView) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 View (android.view.View)1 ReadingListsFunnel (org.wikipedia.analytics.ReadingListsFunnel)1