Fix clipping

This commit is contained in:
Niels Andriesse 2021-06-10 10:18:37 +10:00
parent bf24b84840
commit 2ef1f83e6d
2 changed files with 10 additions and 3 deletions

View File

@ -5,14 +5,19 @@ import android.util.AttributeSet
import android.view.MotionEvent import android.view.MotionEvent
import android.view.VelocityTracker import android.view.VelocityTracker
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import org.thoughtcrime.securesms.loki.utilities.disableClipping
import kotlin.math.abs import kotlin.math.abs
class ConversationRecyclerView : RecyclerView { class ConversationRecyclerView : RecyclerView {
private var velocityTracker: VelocityTracker? = null private var velocityTracker: VelocityTracker? = null
constructor(context: Context) : super(context) constructor(context: Context) : super(context) { initialize() }
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { initialize() }
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) { initialize() }
private fun initialize() {
disableClipping()
}
override fun onInterceptTouchEvent(e: MotionEvent): Boolean { override fun onInterceptTouchEvent(e: MotionEvent): Boolean {
return false return false

View File

@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.conversation.v2.messages
import android.content.Context import android.content.Context
import android.graphics.Canvas import android.graphics.Canvas
import android.graphics.Rect import android.graphics.Rect
import android.graphics.Region
import android.graphics.drawable.ColorDrawable import android.graphics.drawable.ColorDrawable
import android.os.Build import android.os.Build
import android.os.Handler import android.os.Handler
@ -12,6 +13,7 @@ import android.util.Log
import android.view.* import android.view.*
import android.widget.LinearLayout import android.widget.LinearLayout
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.core.graphics.withClip
import androidx.core.view.isVisible import androidx.core.view.isVisible
import kotlinx.android.synthetic.main.view_visible_message.view.* import kotlinx.android.synthetic.main.view_visible_message.view.*
import network.loki.messenger.R import network.loki.messenger.R