Show location replies per the designs
This commit is contained in:
parent
9e44a9eb8c
commit
f5e57f1645
14 changed files with 167 additions and 16 deletions
|
|
@ -30,6 +30,7 @@ import androidx.compose.ui.graphics.Color
|
|||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.IntOffset
|
||||
import androidx.compose.ui.unit.dp
|
||||
import coil.compose.AsyncImagePainter
|
||||
import coil.compose.rememberAsyncImagePainter
|
||||
|
|
@ -43,6 +44,7 @@ import io.element.android.libraries.designsystem.text.toDp
|
|||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.theme.ElementTheme
|
||||
import timber.log.Timber
|
||||
import io.element.android.libraries.matrix.ui.R as MatrixUIR
|
||||
|
||||
/**
|
||||
* Shows a static map image downloaded via a third party service's static maps API.
|
||||
|
|
@ -103,9 +105,15 @@ fun StaticMapView(
|
|||
contentScale = ContentScale.Fit,
|
||||
)
|
||||
Icon(
|
||||
resourceId = R.drawable.pin,
|
||||
resourceId = MatrixUIR.drawable.pin,
|
||||
contentDescription = null,
|
||||
tint = Color.Unspecified
|
||||
tint = Color.Unspecified,
|
||||
modifier = Modifier.align { size, space, _ ->
|
||||
IntOffset(
|
||||
x = (space.width - size.width) / 2,
|
||||
y = (space.height / 2) - size.height,
|
||||
)
|
||||
}
|
||||
)
|
||||
} else {
|
||||
StaticMapPlaceholder(
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="50dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="50"
|
||||
android:viewportHeight="108">
|
||||
<group>
|
||||
<clip-path
|
||||
android:pathData="M0,0h50v108h-50z"/>
|
||||
<path
|
||||
android:pathData="M25,54L18.94,48L31.06,48L25,54Z"
|
||||
android:fillColor="#1B1D22"/>
|
||||
<path
|
||||
android:pathData="M25,25m-25,0a25,25 0,1 1,50 0a25,25 0,1 1,-50 0"
|
||||
android:fillColor="#1B1D22"/>
|
||||
<group>
|
||||
<clip-path
|
||||
android:pathData="M13,13h24v24h-24z"/>
|
||||
<path
|
||||
android:pathData="M25,13C20.36,13 16.6,16.86 16.6,21.63C16.6,26.77 21.9,33.86 24.09,36.56C24.57,37.15 25.44,37.15 25.92,36.56C28.1,33.86 33.4,26.77 33.4,21.63C33.4,16.86 29.64,13 25,13ZM25,24.71C23.34,24.71 22,23.33 22,21.63C22,19.93 23.34,18.55 25,18.55C26.66,18.55 28,19.93 28,21.63C28,23.33 26.66,24.71 25,24.71Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</group>
|
||||
</group>
|
||||
</vector>
|
||||
Loading…
Add table
Add a link
Reference in a new issue