mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Making the layout file more generic
This commit is contained in:
parent
b331521e93
commit
7bb73ffb57
2 changed files with 6 additions and 6 deletions
|
@ -28,7 +28,7 @@ import dagger.hilt.android.AndroidEntryPoint
|
|||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.addChildFragment
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.databinding.FragmentLiveLocationMapBinding
|
||||
import im.vector.app.databinding.FragmentSimpleContainerBinding
|
||||
import im.vector.app.features.location.UrlMapProvider
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -36,15 +36,15 @@ import javax.inject.Inject
|
|||
* Screen showing a map with all the current users sharing their live location in room.
|
||||
*/
|
||||
@AndroidEntryPoint
|
||||
class LocationLiveMapViewFragment : VectorBaseFragment<FragmentLiveLocationMapBinding>() {
|
||||
class LocationLiveMapViewFragment : VectorBaseFragment<FragmentSimpleContainerBinding>() {
|
||||
|
||||
@Inject
|
||||
lateinit var urlMapProvider: UrlMapProvider
|
||||
|
||||
private val args: LocationLiveMapViewArgs by args()
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLiveLocationMapBinding {
|
||||
return FragmentLiveLocationMapBinding.inflate(layoutInflater, container, false)
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentSimpleContainerBinding {
|
||||
return FragmentSimpleContainerBinding.inflate(layoutInflater, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
|
@ -67,7 +67,7 @@ class LocationLiveMapViewFragment : VectorBaseFragment<FragmentLiveLocationMapBi
|
|||
?: run {
|
||||
val options = MapboxMapOptions.createFromAttributes(requireContext(), null)
|
||||
SupportMapFragment.newInstance(options)
|
||||
.also { addChildFragment(R.id.liveLocationMapContainer, it, tag = MAP_FRAGMENT_TAG) }
|
||||
.also { addChildFragment(R.id.fragmentContainer, it, tag = MAP_FRAGMENT_TAG) }
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/liveLocationMapContainer"
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
Loading…
Reference in a new issue