I'm trying to turn this code into a multiple search, ie not just a Users city, but include state and country.
I have the 3 search input windows in the xml, the getters and setters ready, but I haven't seen any code to accomplish want I'd like to do: it will only find a user by city.
private fun firebaseUserSearch(searchText: String) {
Toast.makeText(this@MainActivity, "Started Search", Toast.LENGTH_LONG).show()
val firebaseSearchQuery = mUserDatabase!!.orderByChild("name").startAt(searchText).endAt(searchText + "\uf8ff")
val options = FirebaseRecyclerOptions.Builder<Users>()
.setQuery(
firebaseSearchQuery, Users::class.java!!)
.build()
So with this code I can only search one child city and I get the user that lives in that city. I'd like to search city, state, country. Thank you in advance for your help.
Here's an image of the UI that will explain what I'm trying to do