Class PlayerSearchController


  • public class PlayerSearchController
    extends java.lang.Object
    Controls the PlayerSearchFragment
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void displaySearchQueryData​(java.lang.String usernameQuery, java.util.List<SearchQueryEntry> searchQueryEntries, SearchQueryEntryAdapter entryAdapter, android.widget.LinearLayout searchLinearLayout, android.content.Context context)
      Displays the search query data in the list view of the PlayerSearchFragment
      void handleBackButton()
      Handles the switch from the PlayerSearchFragment to the Leaderboard fragment when the back button is pressed
      void handleSearchQuery​(java.lang.String query)
      Handles the user's search query by transitioning to the search fragment
      void handleSearchQueryListClick​(SearchQueryEntry entry)
      Handles when user clicking on a search entry by transitioning to their profile
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PlayerSearchController

        public PlayerSearchController​(GameController gameController)
        Creates a PlayerSearchController
        Parameters:
        gameController - Used to transition between fragments
    • Method Detail

      • handleBackButton

        public void handleBackButton()
        Handles the switch from the PlayerSearchFragment to the Leaderboard fragment when the back button is pressed
      • handleSearchQuery

        public void handleSearchQuery​(java.lang.String query)
        Handles the user's search query by transitioning to the search fragment
        Parameters:
        query - Username query the user is searching for
      • displaySearchQueryData

        public void displaySearchQueryData​(java.lang.String usernameQuery,
                                           java.util.List<SearchQueryEntry> searchQueryEntries,
                                           SearchQueryEntryAdapter entryAdapter,
                                           android.widget.LinearLayout searchLinearLayout,
                                           android.content.Context context)
        Displays the search query data in the list view of the PlayerSearchFragment
        Parameters:
        usernameQuery - Username query the user is searching for
        searchQueryEntries - All related entries to the user's username query
        entryAdapter - Adapter for the search query entries
        searchLinearLayout - Container for the search queries
        context - Used to access the context of the fragment
      • handleSearchQueryListClick

        public void handleSearchQueryListClick​(SearchQueryEntry entry)
        Handles when user clicking on a search entry by transitioning to their profile
        Parameters:
        entry - Entry the user clicks on