Class PlayerSearchController
- java.lang.Object
-
- com.cmput301w23t09.qrhunter.leaderboard.PlayerSearchController
-
public class PlayerSearchController extends java.lang.Object
Controls the PlayerSearchFragment
-
-
Constructor Summary
Constructors Constructor Description PlayerSearchController(GameController gameController)
Creates a PlayerSearchController
-
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 PlayerSearchFragmentvoid
handleBackButton()
Handles the switch from the PlayerSearchFragment to the Leaderboard fragment when the back button is pressedvoid
handleSearchQuery(java.lang.String query)
Handles the user's search query by transitioning to the search fragmentvoid
handleSearchQueryListClick(SearchQueryEntry entry)
Handles when user clicking on a search entry by transitioning to their profile
-
-
-
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 forsearchQueryEntries
- All related entries to the user's username queryentryAdapter
- Adapter for the search query entriessearchLinearLayout
- Container for the search queriescontext
- 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
-
-