mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-16 20:10:04 +03:00
No need for an extra FrameLayout
This commit is contained in:
parent
2dc52da30c
commit
e0ac8ee8b8
2 changed files with 14 additions and 22 deletions
|
@ -16,7 +16,6 @@
|
|||
|
||||
package im.vector.app.features.home.room.detail.timeline.item
|
||||
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.ImageView
|
||||
import com.airbnb.epoxy.EpoxyAttribute
|
||||
import com.airbnb.epoxy.EpoxyModelClass
|
||||
|
@ -56,12 +55,12 @@ abstract class MessageLocationItem : AbsMessageItem<MessageLocationItem.Holder>(
|
|||
|
||||
override fun bind(holder: Holder) {
|
||||
super.bind(holder)
|
||||
renderSendState(holder.mapViewContainer, null)
|
||||
renderSendState(holder.view, null)
|
||||
|
||||
val location = locationData ?: return
|
||||
val locationOwnerId = userId ?: return
|
||||
|
||||
holder.mapViewContainer.onClick {
|
||||
holder.view.onClick {
|
||||
callback?.onMapClicked()
|
||||
}
|
||||
|
||||
|
@ -80,7 +79,6 @@ abstract class MessageLocationItem : AbsMessageItem<MessageLocationItem.Holder>(
|
|||
override fun getViewType() = STUB_ID
|
||||
|
||||
class Holder : AbsMessageItem.Holder(STUB_ID) {
|
||||
val mapViewContainer by bind<FrameLayout>(R.id.mapViewContainer)
|
||||
val staticMapImageView by bind<ImageView>(R.id.staticMapImageView)
|
||||
val staticMapPinImageView by bind<ImageView>(R.id.staticMapPinImageView)
|
||||
}
|
||||
|
|
|
@ -6,25 +6,19 @@
|
|||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/mapViewContainer"
|
||||
<ImageView
|
||||
android:id="@+id/staticMapImageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="200dp"
|
||||
android:contentDescription="@string/a11y_static_map_image" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/staticMapImageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:contentDescription="@string/a11y_static_map_image" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/staticMapPinImageView"
|
||||
android:layout_width="51dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="28dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/bg_map_user_pin" />
|
||||
</FrameLayout>
|
||||
<ImageView
|
||||
android:id="@+id/staticMapPinImageView"
|
||||
android:layout_width="51dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="28dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/bg_map_user_pin" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
Loading…
Add table
Reference in a new issue