Class QuizFragment

    • Constructor Detail

      • QuizFragment

        public QuizFragment()
    • Method Detail

      • onViewCreated

        public void onViewCreated​(@NonNull
                                  View view,
                                  @Nullable
                                  Bundle savedInstanceState)
        Overrides the onViewCreated method in Fragment. Specifically, interacts with the question pager adapter to display a list of questions from the database that the user can use to quiz themselves.
        Overrides:
        onViewCreated in class Fragment
        Parameters:
        view - a View.
        savedInstanceState - a Bundle.
      • onOptionsItemSelected

        public boolean onOptionsItemSelected​(@NonNull
                                             MenuItem item)
        Overrides the onOptionsItemSelected method in AppCompatActivity. Specifies what to do if the user clicks on each menu item (Sign out versus Settings).
        Overrides:
        onOptionsItemSelected in class Fragment
        Parameters:
        item - a menu item.
        Returns:
        a boolean representing if the item was handled successfully or not.