Closed thoaileminh closed 4 years ago
is everything working normally on other devices? and the issue only on Samsung S10+?
Just xml layout is working fine on other devices, excepted S10+. And OnItemClickListener event is not working all device.
is that your code?
class StarSlideAdapter(
items: ArrayList,
listener : OnItemClickListener? = null
) : PlutoAdapter<StarSlideItemModel, StarSlideAdapter.ViewHolder>(items, listener)
because I belive you should specify the model in the listener and in the list like this
class StarSlideAdapter(
items: ArrayList<StarSlideItemModel>,
listener : OnItemClickListener<StarSlideItemModel>? = null
) : PlutoAdapter<StarSlideItemModel, StarSlideAdapter.ViewHolder>(items, listener)
Here is my complete code, github cut my code, it still not work bro @Ramzi-Alqrainy :(
maybe there is n issue in the logger, check your logcat filter or show toast instead
I checked many time, I want to open new Activity, but debugger not detect my breakpoint
not reproducible, you can clone and customize the library I'm pretty it will work with you
I have 2 proplems, please help me reslove them: 1: My layout above not show custom color indicators.
`<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content">
</androidx.constraintlayout.widget.ConstraintLayout>`
I have to custom in my code, please check:
` val dm = DisplayMetrics() activity?.windowManager?.defaultDisplay?.getMetrics(dm)
2. onItemClicked event not working Apdater: `class StarSlideAdapter( items: ArrayList,
listener : OnItemClickListener? = null
) : PlutoAdapter<StarSlideItemModel, StarSlideAdapter.ViewHolder>(items, listener) {
}`
Fragment: ` val adapter = StarSlideAdapter(createItemSlider(), object : OnItemClickListener {
override fun onItemClicked(item: StarSlideItemModel?, position: Int) {
Timber.e("----> slideItem %s ", item)
}
})