Skip to content
New issue

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

Can not update the view added #3

Closed
sukhvir41 opened this issue Jun 17, 2016 · 2 comments
Closed

Can not update the view added #3

sukhvir41 opened this issue Jun 17, 2016 · 2 comments

Comments

@sukhvir41
Copy link

i have added a view between two adapters and the view has check boxes . i cane update the values of the view ie the TextView values in the view and how to handle the check box clicks in the view

@xingstarx
Copy link

could you use
CheckBox checkBox = (CheckBox) view.findViewById(R.id.checkbox);
and set OnCheckedChangeListener for checkBox

@ronaldwolvers
Copy link
Contributor

You will probably have to call notifyItemChanged(int position) (https://developer.android.com/reference/android/support/v7/widget/RecyclerView.Adapter.html#notifyItemChanged(int)). If you do not call this method, onBindViewHolder() is never called on your adapter and the ViewHolder will not be able to update the View it holds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants