Read marker: refine JumpToReafMarkerView

This commit is contained in:
ganfra 2019-10-01 12:33:38 +02:00
parent e842bf13b2
commit 31397869b2
2 changed files with 7 additions and 9 deletions

View file

@ -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 {

View file

@ -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"