diff --git a/changelog.d/5395.feature b/changelog.d/5395.feature
new file mode 100644
index 0000000000..eb16c6cd81
--- /dev/null
+++ b/changelog.d/5395.feature
@@ -0,0 +1 @@
+Add a custom view to display a picker for share location options
diff --git a/library/ui-styles/src/main/res/values/colors.xml b/library/ui-styles/src/main/res/values/colors.xml
index 6610c0f45d..e4e8b1d900 100644
--- a/library/ui-styles/src/main/res/values/colors.xml
+++ b/library/ui-styles/src/main/res/values/colors.xml
@@ -139,4 +139,8 @@
@color/palette_gray_100
@color/palette_gray_450
+
+
+ @color/palette_prune
+ @color/palette_prune
diff --git a/library/ui-styles/src/main/res/values/dimens.xml b/library/ui-styles/src/main/res/values/dimens.xml
index db42cfa12c..4719d77fbe 100644
--- a/library/ui-styles/src/main/res/values/dimens.xml
+++ b/library/ui-styles/src/main/res/values/dimens.xml
@@ -70,4 +70,7 @@
- 0.15
- 0.05
-
\ No newline at end of file
+
+
+ 10dp
+
diff --git a/library/ui-styles/src/main/res/values/stylable_location_sharing_option_picker_view.xml b/library/ui-styles/src/main/res/values/stylable_location_sharing_option_picker_view.xml
new file mode 100644
index 0000000000..25b2687fed
--- /dev/null
+++ b/library/ui-styles/src/main/res/values/stylable_location_sharing_option_picker_view.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/library/ui-styles/src/main/res/values/theme_dark.xml b/library/ui-styles/src/main/res/values/theme_dark.xml
index 607f008453..8cd4dc2399 100644
--- a/library/ui-styles/src/main/res/values/theme_dark.xml
+++ b/library/ui-styles/src/main/res/values/theme_dark.xml
@@ -145,6 +145,8 @@
- @style/Widget.Vector.ActionButton
+
+ - @color/vctr_live_location_dark
diff --git a/library/ui-styles/src/main/res/values/theme_light.xml b/library/ui-styles/src/main/res/values/theme_light.xml
index efc18b9f32..622af6577b 100644
--- a/library/ui-styles/src/main/res/values/theme_light.xml
+++ b/library/ui-styles/src/main/res/values/theme_light.xml
@@ -146,6 +146,8 @@
- @style/Widget.Vector.ActionButton
+
+ - @color/vctr_live_location_light
diff --git a/vector/src/main/java/im/vector/app/core/extensions/ViewExtensions.kt b/vector/src/main/java/im/vector/app/core/extensions/ViewExtensions.kt
index 54fcac42d1..f9ca8cb57c 100644
--- a/vector/src/main/java/im/vector/app/core/extensions/ViewExtensions.kt
+++ b/vector/src/main/java/im/vector/app/core/extensions/ViewExtensions.kt
@@ -23,6 +23,7 @@ import android.view.ViewGroup
import android.widget.EditText
import android.widget.ImageView
import androidx.annotation.AttrRes
+import androidx.annotation.ColorInt
import androidx.annotation.DrawableRes
import androidx.appcompat.widget.SearchView
import androidx.core.content.ContextCompat
@@ -70,6 +71,15 @@ fun View.setAttributeTintedBackground(@DrawableRes drawableRes: Int, @AttrRes ti
background = drawable
}
+fun View.tintBackground(@ColorInt tintColor: Int) {
+ val bkg = background?.let {
+ val backgroundDrawable = DrawableCompat.wrap(background)
+ DrawableCompat.setTint(backgroundDrawable, tintColor)
+ backgroundDrawable
+ }
+ background = bkg
+}
+
fun ImageView.setAttributeTintedImageResource(@DrawableRes drawableRes: Int, @AttrRes tint: Int) {
val drawable = ContextCompat.getDrawable(context, drawableRes)!!
DrawableCompat.setTint(drawable, ThemeUtils.getColor(context, tint))
diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/LocationPinProvider.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/LocationPinProvider.kt
index 0cf30c8c01..7262284c95 100644
--- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/LocationPinProvider.kt
+++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/LocationPinProvider.kt
@@ -19,7 +19,9 @@ package im.vector.app.features.home.room.detail.timeline.helper
import android.content.Context
import android.graphics.drawable.Drawable
import android.graphics.drawable.LayerDrawable
+import androidx.annotation.ColorInt
import androidx.core.content.ContextCompat
+import androidx.core.graphics.drawable.DrawableCompat
import com.bumptech.glide.request.target.CustomTarget
import com.bumptech.glide.request.transition.Transition
import im.vector.app.R
@@ -37,7 +39,8 @@ class LocationPinProvider @Inject constructor(
private val context: Context,
private val activeSessionHolder: ActiveSessionHolder,
private val dimensionConverter: DimensionConverter,
- private val avatarRenderer: AvatarRenderer
+ private val avatarRenderer: AvatarRenderer,
+ private val matrixItemColorProvider: MatrixItemColorProvider
) {
private val cache = mutableMapOf()
@@ -61,35 +64,42 @@ class LocationPinProvider @Inject constructor(
return
}
- activeSessionHolder.getActiveSession().getUser(userId)?.toMatrixItem()?.let {
- val size = dimensionConverter.dpToPx(44)
- avatarRenderer.render(glideRequests, it, object : CustomTarget(size, size) {
- override fun onResourceReady(resource: Drawable, transition: Transition?) {
- Timber.d("## Location: onResourceReady")
- val pinDrawable = createPinDrawable(resource)
- cache[userId] = pinDrawable
- callback(pinDrawable)
- }
+ activeSessionHolder
+ .getActiveSession()
+ .getUser(userId)
+ ?.toMatrixItem()
+ ?.let { userItem ->
+ val size = dimensionConverter.dpToPx(44)
+ val bgTintColor = matrixItemColorProvider.getColor(userItem)
+ avatarRenderer.render(glideRequests, userItem, object : CustomTarget(size, size) {
+ override fun onResourceReady(resource: Drawable, transition: Transition?) {
+ Timber.d("## Location: onResourceReady")
+ val pinDrawable = createPinDrawable(resource, bgTintColor)
+ cache[userId] = pinDrawable
+ callback(pinDrawable)
+ }
- override fun onLoadCleared(placeholder: Drawable?) {
- // Is it possible? Put placeholder instead?
- // FIXME The doc says it has to be implemented and should free resources
- Timber.d("## Location: onLoadCleared")
- }
+ override fun onLoadCleared(placeholder: Drawable?) {
+ // Is it possible? Put placeholder instead?
+ // FIXME The doc says it has to be implemented and should free resources
+ Timber.d("## Location: onLoadCleared")
+ }
- override fun onLoadFailed(errorDrawable: Drawable?) {
- Timber.w("## Location: onLoadFailed")
- errorDrawable ?: return
- val pinDrawable = createPinDrawable(errorDrawable)
- cache[userId] = pinDrawable
- callback(pinDrawable)
+ override fun onLoadFailed(errorDrawable: Drawable?) {
+ Timber.w("## Location: onLoadFailed")
+ errorDrawable ?: return
+ val pinDrawable = createPinDrawable(errorDrawable, bgTintColor)
+ cache[userId] = pinDrawable
+ callback(pinDrawable)
+ }
+ })
}
- })
- }
}
- private fun createPinDrawable(drawable: Drawable): Drawable {
+ private fun createPinDrawable(drawable: Drawable, @ColorInt bgTintColor: Int): Drawable {
val bgUserPin = ContextCompat.getDrawable(context, R.drawable.bg_map_user_pin)!!
+ // use mutate on drawable to avoid sharing the color when we have multiple different user pins
+ DrawableCompat.setTint(bgUserPin.mutate(), bgTintColor)
val layerDrawable = LayerDrawable(arrayOf(bgUserPin, drawable))
val horizontalInset = dimensionConverter.dpToPx(4)
val topInset = dimensionConverter.dpToPx(4)
diff --git a/vector/src/main/java/im/vector/app/features/location/LocationSharingFragment.kt b/vector/src/main/java/im/vector/app/features/location/LocationSharingFragment.kt
index a7e93a3f6c..b1033f2797 100644
--- a/vector/src/main/java/im/vector/app/features/location/LocationSharingFragment.kt
+++ b/vector/src/main/java/im/vector/app/features/location/LocationSharingFragment.kt
@@ -30,6 +30,10 @@ import im.vector.app.R
import im.vector.app.core.extensions.exhaustive
import im.vector.app.core.platform.VectorBaseFragment
import im.vector.app.databinding.FragmentLocationSharingBinding
+import im.vector.app.features.home.AvatarRenderer
+import im.vector.app.features.home.room.detail.timeline.helper.MatrixItemColorProvider
+import im.vector.app.features.location.option.LocationSharingOption
+import org.matrix.android.sdk.api.util.MatrixItem
import java.lang.ref.WeakReference
import javax.inject.Inject
@@ -37,7 +41,9 @@ import javax.inject.Inject
* We should consider using SupportMapFragment for a out of the box lifecycle handling
*/
class LocationSharingFragment @Inject constructor(
- private val urlMapProvider: UrlMapProvider
+ private val urlMapProvider: UrlMapProvider,
+ private val avatarRenderer: AvatarRenderer,
+ private val matrixItemColorProvider: MatrixItemColorProvider
) : VectorBaseFragment() {
private val viewModel: LocationSharingViewModel by fragmentViewModel()
@@ -45,6 +51,8 @@ class LocationSharingFragment @Inject constructor(
// Keep a ref to handle properly the onDestroy callback
private var mapView: WeakReference? = null
+ private var hasRenderedUserAvatar = false
+
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLocationSharingBinding {
return FragmentLocationSharingBinding.inflate(inflater, container, false)
}
@@ -59,9 +67,7 @@ class LocationSharingFragment @Inject constructor(
views.mapView.initialize(urlMapProvider.getMapUrl())
}
- views.shareLocationContainer.debouncedClicks {
- viewModel.handle(LocationSharingAction.OnShareLocation)
- }
+ initOptionsPicker()
viewModel.observeViewEvents {
when (it) {
@@ -107,6 +113,12 @@ class LocationSharingFragment @Inject constructor(
super.onDestroy()
}
+ override fun invalidate() = withState(viewModel) { state ->
+ views.mapView.render(state.toMapState())
+ views.shareLocationGpsLoading.isGone = state.lastKnownLocation != null
+ updateUserAvatar(state.userItem)
+ }
+
private fun handleLocationNotAvailableError() {
MaterialAlertDialogBuilder(requireActivity())
.setTitle(R.string.location_not_available_dialog_title)
@@ -118,8 +130,28 @@ class LocationSharingFragment @Inject constructor(
.show()
}
- override fun invalidate() = withState(viewModel) { state ->
- views.mapView.render(state.toMapState())
- views.shareLocationGpsLoading.isGone = state.lastKnownLocation != null
+ private fun initOptionsPicker() {
+ // TODO
+ // change the options dynamically depending on the current chosen location
+ views.shareLocationOptionsPicker.render(LocationSharingOption.USER_CURRENT)
+ views.shareLocationOptionsPicker.optionPinned.debouncedClicks {
+ // TODO
+ }
+ views.shareLocationOptionsPicker.optionUserCurrent.debouncedClicks {
+ viewModel.handle(LocationSharingAction.OnShareLocation)
+ }
+ views.shareLocationOptionsPicker.optionUserLive.debouncedClicks {
+ // TODO
+ }
+ }
+
+ private fun updateUserAvatar(userItem: MatrixItem.UserItem?) {
+ userItem?.takeUnless { hasRenderedUserAvatar }
+ ?.let {
+ hasRenderedUserAvatar = true
+ avatarRenderer.render(it, views.shareLocationOptionsPicker.optionUserCurrent.iconView)
+ val tintColor = matrixItemColorProvider.getColor(it)
+ views.shareLocationOptionsPicker.optionUserCurrent.setIconBackgroundTint(tintColor)
+ }
}
}
diff --git a/vector/src/main/java/im/vector/app/features/location/LocationSharingViewModel.kt b/vector/src/main/java/im/vector/app/features/location/LocationSharingViewModel.kt
index f4e1fd0281..989ec255e5 100644
--- a/vector/src/main/java/im/vector/app/features/location/LocationSharingViewModel.kt
+++ b/vector/src/main/java/im/vector/app/features/location/LocationSharingViewModel.kt
@@ -26,6 +26,7 @@ import im.vector.app.core.extensions.exhaustive
import im.vector.app.core.platform.VectorViewModel
import im.vector.app.features.home.room.detail.timeline.helper.LocationPinProvider
import org.matrix.android.sdk.api.session.Session
+import org.matrix.android.sdk.api.util.toMatrixItem
class LocationSharingViewModel @AssistedInject constructor(
@Assisted private val initialState: LocationSharingViewState,
@@ -45,9 +46,14 @@ class LocationSharingViewModel @AssistedInject constructor(
init {
locationTracker.start(this)
+ setUserItem()
createPin()
}
+ private fun setUserItem() {
+ setState { copy(userItem = session.getUser(session.myUserId)?.toMatrixItem()) }
+ }
+
private fun createPin() {
locationPinProvider.create(session.myUserId) {
setState {
diff --git a/vector/src/main/java/im/vector/app/features/location/LocationSharingViewState.kt b/vector/src/main/java/im/vector/app/features/location/LocationSharingViewState.kt
index a9a24094eb..e63206f515 100644
--- a/vector/src/main/java/im/vector/app/features/location/LocationSharingViewState.kt
+++ b/vector/src/main/java/im/vector/app/features/location/LocationSharingViewState.kt
@@ -20,6 +20,7 @@ import android.graphics.drawable.Drawable
import androidx.annotation.StringRes
import com.airbnb.mvrx.MavericksState
import im.vector.app.R
+import org.matrix.android.sdk.api.util.MatrixItem
enum class LocationSharingMode(@StringRes val titleRes: Int) {
STATIC_SHARING(R.string.location_activity_title_static_sharing),
@@ -29,6 +30,7 @@ enum class LocationSharingMode(@StringRes val titleRes: Int) {
data class LocationSharingViewState(
val roomId: String,
val mode: LocationSharingMode,
+ val userItem: MatrixItem.UserItem? = null,
val lastKnownLocation: LocationData? = null,
val pinDrawable: Drawable? = null
) : MavericksState {
diff --git a/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOption.kt b/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOption.kt
new file mode 100644
index 0000000000..ebf9bde5f6
--- /dev/null
+++ b/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOption.kt
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2022 New Vector Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package im.vector.app.features.location.option
+
+enum class LocationSharingOption {
+ /**
+ * Current user's location.
+ */
+ USER_CURRENT,
+
+ /**
+ * User's location during a certain amount of time.
+ */
+ USER_LIVE,
+
+ /**
+ * Static location pinned by the user.
+ */
+ PINNED
+}
diff --git a/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOptionPickerView.kt b/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOptionPickerView.kt
new file mode 100644
index 0000000000..1aea1ff613
--- /dev/null
+++ b/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOptionPickerView.kt
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2022 New Vector Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package im.vector.app.features.location.option
+
+import android.content.Context
+import android.util.AttributeSet
+import android.util.TypedValue
+import android.view.LayoutInflater
+import android.view.View
+import androidx.constraintlayout.widget.ConstraintLayout
+import androidx.core.content.ContextCompat
+import androidx.core.view.isVisible
+import im.vector.app.R
+import im.vector.app.databinding.ViewLocationSharingOptionPickerBinding
+
+/**
+ * Custom view to display the location sharing option picker.
+ */
+class LocationSharingOptionPickerView @JvmOverloads constructor(
+ context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
+) : ConstraintLayout(context, attrs, defStyleAttr) {
+
+ val optionPinned: LocationSharingOptionView
+ get() = binding.locationSharingOptionPinned
+
+ val optionUserCurrent: LocationSharingOptionView
+ get() = binding.locationSharingOptionUserCurrent
+
+ val optionUserLive: LocationSharingOptionView
+ get() = binding.locationSharingOptionUserLive
+
+ private val divider1: View
+ get() = binding.locationSharingOptionsDivider1
+
+ private val divider2: View
+ get() = binding.locationSharingOptionsDivider2
+
+ private val binding = ViewLocationSharingOptionPickerBinding.inflate(
+ LayoutInflater.from(context),
+ this
+ )
+
+ init {
+ applyBackground()
+ }
+
+ fun render(vararg options: LocationSharingOption) {
+ val optionsNumber = options.toSet().size
+ val isPinnedVisible = options.contains(LocationSharingOption.PINNED)
+ val isUserCurrentVisible = options.contains(LocationSharingOption.USER_CURRENT)
+ val isUserLiveVisible = options.contains(LocationSharingOption.USER_LIVE)
+
+ optionPinned.isVisible = isPinnedVisible
+ divider1.isVisible = isPinnedVisible && optionsNumber > 1
+ optionUserCurrent.isVisible = isUserCurrentVisible
+ divider2.isVisible = isUserCurrentVisible && isUserLiveVisible
+ optionUserLive.isVisible = isUserLiveVisible
+ }
+
+ private fun applyBackground() {
+ val outValue = TypedValue()
+ context.theme.resolveAttribute(
+ R.attr.colorSurface,
+ outValue,
+ true
+ )
+ binding.root.background = ContextCompat.getDrawable(
+ context,
+ outValue.resourceId
+ )
+ }
+}
diff --git a/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOptionView.kt b/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOptionView.kt
new file mode 100644
index 0000000000..d11ff00261
--- /dev/null
+++ b/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOptionView.kt
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2022 New Vector Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package im.vector.app.features.location.option
+
+import android.content.Context
+import android.content.res.TypedArray
+import android.util.AttributeSet
+import android.view.LayoutInflater
+import android.widget.ImageView
+import androidx.annotation.ColorInt
+import androidx.constraintlayout.widget.ConstraintLayout
+import androidx.core.content.ContextCompat
+import androidx.core.view.setPadding
+import im.vector.app.R
+import im.vector.app.core.extensions.tintBackground
+import im.vector.app.databinding.ViewLocationSharingOptionBinding
+
+/**
+ * Custom view to display a location sharing option.
+ */
+class LocationSharingOptionView @JvmOverloads constructor(
+ context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
+) : ConstraintLayout(context, attrs, defStyleAttr) {
+
+ val iconView: ImageView
+ get() = binding.shareLocationOptionIcon
+
+ private val binding = ViewLocationSharingOptionBinding.inflate(
+ LayoutInflater.from(context),
+ this
+ )
+
+ init {
+ context.theme.obtainStyledAttributes(
+ attrs,
+ R.styleable.LocationSharingOptionView,
+ 0,
+ 0
+ ).run {
+ try {
+ setIcon(this)
+ setTitle(this)
+ } finally {
+ recycle()
+ }
+ }
+ }
+
+ fun setIconBackgroundTint(@ColorInt color: Int) {
+ binding.shareLocationOptionIcon.tintBackground(color)
+ }
+
+ private fun setIcon(typedArray: TypedArray) {
+ val icon = typedArray.getDrawable(R.styleable.LocationSharingOptionView_locShareIcon)
+ val background = typedArray.getDrawable(R.styleable.LocationSharingOptionView_locShareIconBackground)
+ val backgroundTint = typedArray.getColor(
+ R.styleable.LocationSharingOptionView_locShareIconBackgroundTint,
+ ContextCompat.getColor(context, android.R.color.transparent)
+ )
+ val padding = typedArray.getDimensionPixelOffset(
+ R.styleable.LocationSharingOptionView_locShareIconPadding,
+ context.resources.getDimensionPixelOffset(R.dimen.location_sharing_option_default_padding)
+ )
+ val description = typedArray.getString(R.styleable.LocationSharingOptionView_locShareIconDescription)
+
+ iconView.setImageDrawable(icon)
+ iconView.background = background
+ iconView.tintBackground(backgroundTint)
+ iconView.setPadding(padding)
+ iconView.contentDescription = description
+ }
+
+ private fun setTitle(typedArray: TypedArray) {
+ val title = typedArray.getString(R.styleable.LocationSharingOptionView_locShareTitle)
+ binding.shareLocationOptionTitle.text = title
+ }
+}
diff --git a/vector/src/main/res/drawable/ic_attachment_location_live_white.xml b/vector/src/main/res/drawable/ic_attachment_location_live_white.xml
new file mode 100644
index 0000000000..da6a37232d
--- /dev/null
+++ b/vector/src/main/res/drawable/ic_attachment_location_live_white.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/vector/src/main/res/layout/fragment_location_sharing.xml b/vector/src/main/res/layout/fragment_location_sharing.xml
index ad418f3e1c..3d07e4438d 100644
--- a/vector/src/main/res/layout/fragment_location_sharing.xml
+++ b/vector/src/main/res/layout/fragment_location_sharing.xml
@@ -9,52 +9,26 @@
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="0dp"
- app:layout_constraintBottom_toTopOf="@id/shareLocationContainer"
+ app:layout_constraintBottom_toTopOf="@id/shareLocationOptionsPicker"
app:layout_constraintTop_toTopOf="parent"
app:mapbox_renderTextureMode="true"
tools:background="#4F00" />
-
-
-
-
-
+ android:layout_marginBottom="@dimen/layout_vertical_margin"
+ app:layout_constraintBottom_toBottomOf="@id/shareLocationOptionsPicker"
+ app:layout_constraintEnd_toEndOf="@id/shareLocationOptionsPicker" />
-
\ No newline at end of file
+
diff --git a/vector/src/main/res/layout/view_location_sharing_option.xml b/vector/src/main/res/layout/view_location_sharing_option.xml
new file mode 100644
index 0000000000..8257619294
--- /dev/null
+++ b/vector/src/main/res/layout/view_location_sharing_option.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/vector/src/main/res/layout/view_location_sharing_option_picker.xml b/vector/src/main/res/layout/view_location_sharing_option_picker.xml
new file mode 100644
index 0000000000..292963d898
--- /dev/null
+++ b/vector/src/main/res/layout/view_location_sharing_option_picker.xml
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml
index 4ca1d1104f..3f142cc738 100644
--- a/vector/src/main/res/values/strings.xml
+++ b/vector/src/main/res/values/strings.xml
@@ -1,5 +1,5 @@
-
+
%s\'s invitation
Your invitation
%1$s created the room
@@ -2924,9 +2924,17 @@
Share location
Location
- Share location
+
+ Share location
Map
- Share location
+
+ Share location
+ Share my current location
+ Share my current location
+ Share live location
+ Share live location
+ Share this location
+ Share this location
${app_name} could not access your location
${app_name} could not access your location. Please try again later.
Open with