From 31397869b2c5d2a69d15eaf2d4f4ca25ae1c5a62 Mon Sep 17 00:00:00 2001 From: ganfra Date: Tue, 1 Oct 2019 12:33:38 +0200 Subject: [PATCH] Read marker: refine JumpToReafMarkerView --- .../riotx/core/ui/views/JumpToReadMarkerView.kt | 11 +++-------- .../src/main/res/layout/view_jump_to_read_marker.xml | 5 ++++- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/core/ui/views/JumpToReadMarkerView.kt b/vector/src/main/java/im/vector/riotx/core/ui/views/JumpToReadMarkerView.kt index 3cfd6cf4f8..c44b10e31f 100644 --- a/vector/src/main/java/im/vector/riotx/core/ui/views/JumpToReadMarkerView.kt +++ b/vector/src/main/java/im/vector/riotx/core/ui/views/JumpToReadMarkerView.kt @@ -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 { diff --git a/vector/src/main/res/layout/view_jump_to_read_marker.xml b/vector/src/main/res/layout/view_jump_to_read_marker.xml index 4ded65e8f8..aac22b3311 100644 --- a/vector/src/main/res/layout/view_jump_to_read_marker.xml +++ b/vector/src/main/res/layout/view_jump_to_read_marker.xml @@ -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 @@