mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Small renamings to be more consistent
This commit is contained in:
parent
d0a9e9eda0
commit
4cfb79d566
@ -26,8 +26,8 @@ import im.vector.app.core.resources.toTimestamp
|
||||
import im.vector.app.core.utils.DimensionConverter
|
||||
import im.vector.app.features.home.room.detail.RoomDetailAction
|
||||
import im.vector.app.features.home.room.detail.timeline.style.TimelineMessageLayout
|
||||
import im.vector.app.features.location.live.LocationLiveRunningBannerView
|
||||
import im.vector.app.features.location.live.LocationLiveMessageBannerViewState
|
||||
import im.vector.app.features.location.live.LocationLiveRunningBannerView
|
||||
import org.threeten.bp.LocalDateTime
|
||||
|
||||
@EpoxyModelClass
|
||||
@ -112,7 +112,7 @@ abstract class MessageLiveLocationItem : AbsMessageLocationItem<MessageLiveLocat
|
||||
override fun getViewStubId() = STUB_ID
|
||||
|
||||
class Holder : AbsMessageLocationItem.Holder(STUB_ID) {
|
||||
val locationLiveRunningBanner by bind<LocationLiveRunningBannerView>(R.id.locationLiveMessageBanner)
|
||||
val locationLiveRunningBanner by bind<LocationLiveRunningBannerView>(R.id.locationLiveRunningBanner)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
@ -49,16 +49,16 @@ class LocationLiveRunningBannerView @JvmOverloads constructor(
|
||||
)
|
||||
|
||||
val stopButton: Button
|
||||
get() = binding.locationLiveMessageBannerStop
|
||||
get() = binding.locationLiveRunningBannerStop
|
||||
|
||||
private val background: ImageView
|
||||
get() = binding.locationLiveMessageBannerBackground
|
||||
get() = binding.locationLiveRunningBannerBackground
|
||||
|
||||
private val title: TextView
|
||||
get() = binding.locationLiveMessageBannerTitle
|
||||
get() = binding.locationLiveRunningBannerTitle
|
||||
|
||||
private val subTitle: TextView
|
||||
get() = binding.locationLiveMessageBannerSubTitle
|
||||
get() = binding.locationLiveRunningBannerSubTitle
|
||||
|
||||
private var countDownTimer: CountDownTimer? = null
|
||||
|
||||
@ -70,7 +70,7 @@ class LocationLiveRunningBannerView @JvmOverloads constructor(
|
||||
|
||||
GlideApp.with(context)
|
||||
.load(ColorDrawable(ThemeUtils.getColor(context, android.R.attr.colorBackground)))
|
||||
.placeholder(binding.locationLiveMessageBannerBackground.drawable)
|
||||
.placeholder(binding.locationLiveRunningBannerBackground.drawable)
|
||||
.transform(GranularRoundedCorners(0f, 0f, viewState.bottomEndCornerRadiusInDp, viewState.bottomStartCornerRadiusInDp))
|
||||
.into(background)
|
||||
}
|
||||
@ -109,14 +109,14 @@ class LocationLiveRunningBannerView @JvmOverloads constructor(
|
||||
|
||||
if (viewState.isStopButtonCenteredVertically) {
|
||||
constraintSet.connect(
|
||||
R.id.locationLiveMessageBannerStop,
|
||||
R.id.locationLiveRunningBannerStop,
|
||||
ConstraintSet.BOTTOM,
|
||||
R.id.locationLiveMessageBannerBackground,
|
||||
R.id.locationLiveRunningBannerBackground,
|
||||
ConstraintSet.BOTTOM,
|
||||
0
|
||||
)
|
||||
} else {
|
||||
constraintSet.clear(R.id.locationLiveMessageBannerStop, ConstraintSet.BOTTOM)
|
||||
constraintSet.clear(R.id.locationLiveRunningBannerStop, ConstraintSet.BOTTOM)
|
||||
}
|
||||
|
||||
constraintSet.applyTo(parentLayout)
|
||||
|
@ -46,7 +46,7 @@
|
||||
tools:visibility="visible" />
|
||||
|
||||
<im.vector.app.features.location.live.LocationLiveRunningBannerView
|
||||
android:id="@+id/locationLiveMessageBanner"
|
||||
android:id="@+id/locationLiveRunningBanner"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
|
@ -7,7 +7,7 @@
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/locationLiveMessageBannerBackground"
|
||||
android:id="@+id/locationLiveRunningBannerBackground"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:alpha="0.75"
|
||||
@ -18,7 +18,7 @@
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/locationLiveMessageBannerIcon"
|
||||
android:id="@+id/locationLiveRunningBannerIcon"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
@ -26,13 +26,13 @@
|
||||
android:backgroundTint="?vctr_live_location"
|
||||
android:padding="3dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/locationLiveMessageBannerBackground"
|
||||
app:layout_constraintStart_toStartOf="@id/locationLiveRunningBannerBackground"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_attachment_location_live_white"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/locationLiveMessageBannerTitle"
|
||||
android:id="@+id/locationLiveRunningBannerTitle"
|
||||
style="@style/Widget.Vector.TextView.Caption"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
@ -40,16 +40,16 @@
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textColor="?colorOnSurface"
|
||||
app:layout_constraintBottom_toTopOf="@id/locationLiveMessageBannerSubTitle"
|
||||
app:layout_constraintEnd_toStartOf="@id/locationLiveMessageBannerStop"
|
||||
app:layout_constraintBottom_toTopOf="@id/locationLiveRunningBannerSubTitle"
|
||||
app:layout_constraintEnd_toStartOf="@id/locationLiveRunningBannerStop"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toEndOf="@id/locationLiveMessageBannerIcon"
|
||||
app:layout_constraintStart_toEndOf="@id/locationLiveRunningBannerIcon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="@string/location_share_live_enabled" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/locationLiveMessageBannerSubTitle"
|
||||
android:id="@+id/locationLiveRunningBannerSubTitle"
|
||||
style="@style/Widget.Vector.TextView.Caption"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
@ -57,19 +57,19 @@
|
||||
android:lines="1"
|
||||
android:textColor="?vctr_content_secondary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/locationLiveMessageBannerTitle"
|
||||
app:layout_constraintEnd_toEndOf="@id/locationLiveRunningBannerTitle"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toStartOf="@id/locationLiveMessageBannerTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/locationLiveMessageBannerTitle"
|
||||
app:layout_constraintStart_toStartOf="@id/locationLiveRunningBannerTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/locationLiveRunningBannerTitle"
|
||||
tools:text="9min left" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/locationLiveMessageBannerStop"
|
||||
android:id="@+id/locationLiveRunningBannerStop"
|
||||
style="@style/Widget.Vector.Button.Text.LocationLive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/location_share_live_stop"
|
||||
app:layout_constraintBottom_toBottomOf="@id/locationLiveMessageBannerBackground"
|
||||
app:layout_constraintBottom_toBottomOf="@id/locationLiveRunningBannerBackground"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/locationLiveMessageBannerBackground" />
|
||||
app:layout_constraintTop_toTopOf="@id/locationLiveRunningBannerBackground" />
|
||||
</merge>
|
||||
|
Loading…
Reference in New Issue
Block a user