We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I just integrated the code to my recycler view adapter and there I cant able to handle single item click submit after selection.
class ProductsAdapter : RecyclerView.Adapter() { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MovieViewHolder {
val inflater = LayoutInflater.from(parent.context) return MovieViewHolder(inflater, parent) } override fun onBindViewHolder(holder: MovieViewHolder, position: Int) { holder.bind() } override fun getItemCount(): Int = 10}
class MovieViewHolder(inflater: LayoutInflater, parent: ViewGroup) : RecyclerView.ViewHolder(inflater.inflate(R.layout.item_product, parent, false)), OnStateListener { private var mTitleView: TextView? = null private var mIncrementProductView: IncrementProductView? = null
init { mTitleView = itemView.findViewById(R.id.amount) } override fun onCountChange(count: Int) { mTitleView?.text = "$" + count * 45; } override fun onConfirm(count: Int) { Toast.makeText(itemView.context, "Confirm Count : $count", Toast.LENGTH_SHORT).show() } override fun onClose() { Toast.makeText(itemView.context, "Close Action", Toast.LENGTH_SHORT).show() } fun bind() { mTitleView?.text = "23" mIncrementProductView?.setOnStateListener(this) mIncrementProductView?.setOnClickListener { Toast.makeText( itemView.context, "Position clicked $adapterPosition", Toast.LENGTH_SHORT ).show() } }
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I just integrated the code to my recycler view adapter and there I cant able to handle single item click submit after selection.
class ProductsAdapter : RecyclerView.Adapter() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MovieViewHolder {
class MovieViewHolder(inflater: LayoutInflater, parent: ViewGroup) :
RecyclerView.ViewHolder(inflater.inflate(R.layout.item_product, parent, false)),
OnStateListener {
private var mTitleView: TextView? = null
private var mIncrementProductView: IncrementProductView? = null
}
The text was updated successfully, but these errors were encountered: