mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
Read marker: refine JumpToReafMarkerView
This commit is contained in:
parent
e842bf13b2
commit
31397869b2
@ -60,14 +60,9 @@ class JumpToReadMarkerView @JvmOverloads constructor(
|
||||
private fun setupView() {
|
||||
inflate(context, R.layout.view_jump_to_read_marker, this)
|
||||
setBackgroundColor(ContextCompat.getColor(context, R.color.notification_accent_color))
|
||||
jumpToReadMarkerLabelView.movementMethod = BetterLinkMovementMethod.getInstance()
|
||||
isClickable = true
|
||||
jumpToReadMarkerLabelView.text = span(resources.getString(R.string.room_jump_to_first_unread)) {
|
||||
textDecorationLine = "underline"
|
||||
onClick = {
|
||||
readMarkerId?.also {
|
||||
callback?.onJumpToReadMarkerClicked(it)
|
||||
}
|
||||
jumpToReadMarkerLabelView.setOnClickListener {
|
||||
readMarkerId?.also {
|
||||
callback?.onJumpToReadMarkerClicked(it)
|
||||
}
|
||||
}
|
||||
closeJumpToReadMarkerView.setOnClickListener {
|
||||
|
@ -10,11 +10,13 @@
|
||||
android:id="@+id/jumpToReadMarkerLabelView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_toStartOf="@+id/closeJumpToReadMarkerView"
|
||||
android:drawableStart="@drawable/arrow_up_circle"
|
||||
android:drawablePadding="10dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="@string/room_jump_to_first_unread"
|
||||
@ -23,6 +25,7 @@
|
||||
<ImageView
|
||||
android:id="@+id/closeJumpToReadMarkerView"
|
||||
android:layout_width="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignTop="@+id/jumpToReadMarkerLabelView"
|
||||
android:layout_alignBottom="@+id/jumpToReadMarkerLabelView"
|
||||
|
Loading…
Reference in New Issue
Block a user