feat: add haptics to long click event (#290)

Please, someone. Anyone. Tell me it's OK to let go....
This commit is contained in:
TwistedUmbrellaX 2024-03-25 16:23:44 -04:00 committed by GitHub
parent b5eda797b5
commit 378abe73c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 0 deletions

View file

@ -5,6 +5,7 @@ import android.content.Intent
import android.graphics.drawable.Animatable
import android.os.Build
import android.os.Bundle
import android.view.HapticFeedbackConstants
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@ -124,6 +125,7 @@ class HomeFragment : Fragment() {
)
}
binding.homeUserAvatarContainer.setOnLongClickListener {
it.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS)
ContextCompat.startActivity(
requireContext(), Intent(requireContext(), ProfileActivity::class.java)
.putExtra("userId", Anilist.userid),null