FindNetworkActivity.FindLanguageFragment

public static class FindLanguageFragment extends Fragment implements SearchView.OnQueryTextListener

The fragment for finding language networks.

Constructors

FindLanguageFragment

public FindLanguageFragment()

Empty constructor that does nothing.

Methods

newInstance

public static FindLanguageFragment newInstance(int sectionNumber)

Returns a new instance of this fragment for the given section number.

onCreateView

public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)

Create the displayed fragment.

Parameters:
  • inflater – Creates the user interface from R.layout.fragment_find_language
  • container – Parent container to attach inflated View to
  • savedInstanceState – Previous state that is not used.
Returns:

The inflated view to display.

onQueryTextChange

public boolean onQueryTextChange(String newText)

When the query text changes, do nothing to avoid expensive API calls.

Parameters:
  • newText – The updated query text.
Returns:

Always returns true.

onQueryTextSubmit

public boolean onQueryTextSubmit(String query)

When the user submits a query, call FindLanguageFragment.search()

Parameters:
  • query – Query text that is discarded.
Returns:

Always returns true