feat: add haptics to long click event (#290)
Please, someone. Anyone. Tell me it's OK to let go....
This commit is contained in:
parent
b5eda797b5
commit
378abe73c9
3 changed files with 6 additions and 0 deletions
|
@ -4,6 +4,7 @@ import android.content.Intent
|
|||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.util.TypedValue
|
||||
import android.view.HapticFeedbackConstants
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
@ -96,6 +97,7 @@ class AnimePageAdapter : RecyclerView.Adapter<AnimePageAdapter.AnimePageViewHold
|
|||
dialogFragment.show((it.context as AppCompatActivity).supportFragmentManager, "dialog")
|
||||
}
|
||||
trendingBinding.userAvatar.setOnLongClickListener { view ->
|
||||
view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS)
|
||||
ContextCompat.startActivity(
|
||||
view.context,
|
||||
Intent(view.context, ProfileActivity::class.java)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue