mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-29 14:38:45 +03:00
Tint swip reply icon
This commit is contained in:
parent
211a8dc272
commit
3b8a0f8671
1 changed files with 13 additions and 1 deletions
|
@ -25,12 +25,15 @@ import android.view.MotionEvent
|
|||
import android.view.View
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.graphics.drawable.DrawableCompat
|
||||
import androidx.recyclerview.widget.ItemTouchHelper
|
||||
import androidx.recyclerview.widget.ItemTouchHelper.ACTION_STATE_SWIPE
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.airbnb.epoxy.EpoxyModel
|
||||
import com.airbnb.epoxy.EpoxyTouchHelperCallback
|
||||
import com.airbnb.epoxy.EpoxyViewHolder
|
||||
import im.vector.app.R
|
||||
import im.vector.app.features.themes.ThemeUtils
|
||||
import timber.log.Timber
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.min
|
||||
|
@ -52,7 +55,16 @@ class RoomMessageTouchHelperCallback(private val context: Context,
|
|||
private var replyButtonProgress: Float = 0F
|
||||
private var lastReplyButtonAnimationTime: Long = 0
|
||||
|
||||
private var imageDrawable: Drawable = ContextCompat.getDrawable(context, actionIcon)!!
|
||||
private val imageDrawable: Drawable = DrawableCompat.wrap(
|
||||
ContextCompat.getDrawable(context, actionIcon)!!
|
||||
)
|
||||
|
||||
init {
|
||||
DrawableCompat.setTint(
|
||||
imageDrawable,
|
||||
ThemeUtils.getColor(context, R.attr.riotx_text_primary)
|
||||
)
|
||||
}
|
||||
|
||||
private val triggerDistance = convertToPx(100)
|
||||
private val minShowDistance = convertToPx(20)
|
||||
|
|
Loading…
Reference in a new issue