mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-03 02:19:56 +01:00
share geocoded location
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
2f0105abd3
commit
26ae4fa548
@ -14,6 +14,7 @@ import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.AdapterView
|
||||
import android.widget.ListView
|
||||
import androidx.appcompat.widget.SearchView
|
||||
import androidx.core.view.MenuItemCompat
|
||||
@ -76,7 +77,7 @@ class GeocodingController(args: Bundle) : BaseController(args), SearchView.OnQue
|
||||
initAdapter(geocodingResults)
|
||||
}
|
||||
|
||||
private fun initAdapter(addresses : List<Address>) {
|
||||
private fun initAdapter(addresses: List<Address>) {
|
||||
adapter = GeocodingAdapter(context!!, addresses)
|
||||
geocodingResultListView?.adapter = adapter
|
||||
}
|
||||
@ -93,6 +94,11 @@ class GeocodingController(args: Bundle) : BaseController(args), SearchView.OnQue
|
||||
} else {
|
||||
Log.e(TAG, "search string that was passed to GeocodingController was null or empty")
|
||||
}
|
||||
|
||||
geocodingResultListView?.onItemClickListener = AdapterView.OnItemClickListener { parent, view, position, id ->
|
||||
val address: Address = adapter.getItem(position) as Address
|
||||
// TODO: directly share location? or post loaction to LocationPickerConttroller?
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
|
Loading…
Reference in New Issue
Block a user