Select one checkBox in item from recyclerView and deselect previously selected checkBox
up vote
1
down vote
favorite
I have recycler-view with sections. The item include row and title. I want to select one item with checkbox and if user select next one I want to deselect the old the one(checkbox). I cannot find anywhere to achieve this functionality.
Here is my code
recyclerView = (RecyclerView)findViewById(R.id.recyclerViewActivityExample);
recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
list = new ArrayList<>();
list.add(new AnimalObject("Cat","Mammals", false));
list.add(new AnimalObject("Lion","Mammals", false));
list.add(new AnimalObject("Dog","Mammals", false));
list.add(new AnimalObject("Monkey","Mammals", false));
list.add(new AnimalObject("Puma","Mammals", false));
list.add(new AnimalObject("Albatross","Birds", false));
list.add(new AnimalObject("Pigeon","Birds", false));
list.add(new AnimalObject("Crabs","Aquatic Animals", false));
list.add(new AnimalObject("Sharks","Aquatic Animals", false));
MyAdapter myAdapter = new MyAdapter();
sectionedRecyclerViewAdapter = new SectionedRecyclerViewAdapter(getApplicationContext(),
R.layout.layout_list_section, R.id.textViewItemSection, myAdapter, this);
sectionedRecyclerViewAdapter.setSections(list);
recyclerView.setAdapter(sectionedRecyclerViewAdapter);
}
//-------------------Adapter----------------------------
public class MyAdapter extends RecyclerView.Adapter<MyViewHolder> implements MyViewHolder.ViewHolderClickListener {
@Override
public int getItemCount() {
return list.size();
}
@Override
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.
from(parent.getContext()).
inflate(R.layout.layout_list_item, parent, false);
return new MyViewHolder(itemView,this);
}
@Override
public void onBindViewHolder(MyViewHolder holder, final int position) {
AnimalObject animalObject = list.get(position);
holder.title.setText(animalObject.name);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// checkbox.setChecked(true);
row_index = position;
notifyDataSetChanged();
}
});
if (row_index == position) {
holder.checkBox.setChecked(true);
} else {
holder.checkBox.setChecked(false);
}
}
@Override
public void onClick(View v) {
Toast.makeText(getApplicationContext(), list.get(sectionedRecyclerViewAdapter.getIndexForPosition(recyclerView.getChildPosition(v))).name,Toast.LENGTH_SHORT).show();
}
}
// Adapter
public String name;
public String type;
public boolean ischecked ;
public AnimalObject(final String name, final String type, boolean ischecked){
this.name = name ;
this.type = type ;
this.ischecked = ischecked;
}
public boolean ischecked() {
return ischecked;
}
public void setIschecked(boolean ischecked) {
this.ischecked = ischecked;
}
java android android-recyclerview android-checkbox
|
show 1 more comment
up vote
1
down vote
favorite
I have recycler-view with sections. The item include row and title. I want to select one item with checkbox and if user select next one I want to deselect the old the one(checkbox). I cannot find anywhere to achieve this functionality.
Here is my code
recyclerView = (RecyclerView)findViewById(R.id.recyclerViewActivityExample);
recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
list = new ArrayList<>();
list.add(new AnimalObject("Cat","Mammals", false));
list.add(new AnimalObject("Lion","Mammals", false));
list.add(new AnimalObject("Dog","Mammals", false));
list.add(new AnimalObject("Monkey","Mammals", false));
list.add(new AnimalObject("Puma","Mammals", false));
list.add(new AnimalObject("Albatross","Birds", false));
list.add(new AnimalObject("Pigeon","Birds", false));
list.add(new AnimalObject("Crabs","Aquatic Animals", false));
list.add(new AnimalObject("Sharks","Aquatic Animals", false));
MyAdapter myAdapter = new MyAdapter();
sectionedRecyclerViewAdapter = new SectionedRecyclerViewAdapter(getApplicationContext(),
R.layout.layout_list_section, R.id.textViewItemSection, myAdapter, this);
sectionedRecyclerViewAdapter.setSections(list);
recyclerView.setAdapter(sectionedRecyclerViewAdapter);
}
//-------------------Adapter----------------------------
public class MyAdapter extends RecyclerView.Adapter<MyViewHolder> implements MyViewHolder.ViewHolderClickListener {
@Override
public int getItemCount() {
return list.size();
}
@Override
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.
from(parent.getContext()).
inflate(R.layout.layout_list_item, parent, false);
return new MyViewHolder(itemView,this);
}
@Override
public void onBindViewHolder(MyViewHolder holder, final int position) {
AnimalObject animalObject = list.get(position);
holder.title.setText(animalObject.name);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// checkbox.setChecked(true);
row_index = position;
notifyDataSetChanged();
}
});
if (row_index == position) {
holder.checkBox.setChecked(true);
} else {
holder.checkBox.setChecked(false);
}
}
@Override
public void onClick(View v) {
Toast.makeText(getApplicationContext(), list.get(sectionedRecyclerViewAdapter.getIndexForPosition(recyclerView.getChildPosition(v))).name,Toast.LENGTH_SHORT).show();
}
}
// Adapter
public String name;
public String type;
public boolean ischecked ;
public AnimalObject(final String name, final String type, boolean ischecked){
this.name = name ;
this.type = type ;
this.ischecked = ischecked;
}
public boolean ischecked() {
return ischecked;
}
public void setIschecked(boolean ischecked) {
this.ischecked = ischecked;
}
java android android-recyclerview android-checkbox
It's Single item choice selection. You can manage it by declaring position = -1 and check your adapter position while clicking on it.
– Piyush
Nov 22 at 9:56
It is very likely the problem is within the adapter, can you post the code of your adapter?
– Aaron
Nov 22 at 9:59
@Piyush I am not sure how to tell which checkbox to setSelected false.
– cole
Nov 22 at 10:06
@Aaron I updated my question with adapter class added
– cole
Nov 22 at 10:06
@code Weird.. I don't see them.. and your ViewHolder is incomplete, anyway I just want to make sure that you bind the views correctly.
– Aaron
Nov 22 at 10:09
|
show 1 more comment
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have recycler-view with sections. The item include row and title. I want to select one item with checkbox and if user select next one I want to deselect the old the one(checkbox). I cannot find anywhere to achieve this functionality.
Here is my code
recyclerView = (RecyclerView)findViewById(R.id.recyclerViewActivityExample);
recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
list = new ArrayList<>();
list.add(new AnimalObject("Cat","Mammals", false));
list.add(new AnimalObject("Lion","Mammals", false));
list.add(new AnimalObject("Dog","Mammals", false));
list.add(new AnimalObject("Monkey","Mammals", false));
list.add(new AnimalObject("Puma","Mammals", false));
list.add(new AnimalObject("Albatross","Birds", false));
list.add(new AnimalObject("Pigeon","Birds", false));
list.add(new AnimalObject("Crabs","Aquatic Animals", false));
list.add(new AnimalObject("Sharks","Aquatic Animals", false));
MyAdapter myAdapter = new MyAdapter();
sectionedRecyclerViewAdapter = new SectionedRecyclerViewAdapter(getApplicationContext(),
R.layout.layout_list_section, R.id.textViewItemSection, myAdapter, this);
sectionedRecyclerViewAdapter.setSections(list);
recyclerView.setAdapter(sectionedRecyclerViewAdapter);
}
//-------------------Adapter----------------------------
public class MyAdapter extends RecyclerView.Adapter<MyViewHolder> implements MyViewHolder.ViewHolderClickListener {
@Override
public int getItemCount() {
return list.size();
}
@Override
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.
from(parent.getContext()).
inflate(R.layout.layout_list_item, parent, false);
return new MyViewHolder(itemView,this);
}
@Override
public void onBindViewHolder(MyViewHolder holder, final int position) {
AnimalObject animalObject = list.get(position);
holder.title.setText(animalObject.name);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// checkbox.setChecked(true);
row_index = position;
notifyDataSetChanged();
}
});
if (row_index == position) {
holder.checkBox.setChecked(true);
} else {
holder.checkBox.setChecked(false);
}
}
@Override
public void onClick(View v) {
Toast.makeText(getApplicationContext(), list.get(sectionedRecyclerViewAdapter.getIndexForPosition(recyclerView.getChildPosition(v))).name,Toast.LENGTH_SHORT).show();
}
}
// Adapter
public String name;
public String type;
public boolean ischecked ;
public AnimalObject(final String name, final String type, boolean ischecked){
this.name = name ;
this.type = type ;
this.ischecked = ischecked;
}
public boolean ischecked() {
return ischecked;
}
public void setIschecked(boolean ischecked) {
this.ischecked = ischecked;
}
java android android-recyclerview android-checkbox
I have recycler-view with sections. The item include row and title. I want to select one item with checkbox and if user select next one I want to deselect the old the one(checkbox). I cannot find anywhere to achieve this functionality.
Here is my code
recyclerView = (RecyclerView)findViewById(R.id.recyclerViewActivityExample);
recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
list = new ArrayList<>();
list.add(new AnimalObject("Cat","Mammals", false));
list.add(new AnimalObject("Lion","Mammals", false));
list.add(new AnimalObject("Dog","Mammals", false));
list.add(new AnimalObject("Monkey","Mammals", false));
list.add(new AnimalObject("Puma","Mammals", false));
list.add(new AnimalObject("Albatross","Birds", false));
list.add(new AnimalObject("Pigeon","Birds", false));
list.add(new AnimalObject("Crabs","Aquatic Animals", false));
list.add(new AnimalObject("Sharks","Aquatic Animals", false));
MyAdapter myAdapter = new MyAdapter();
sectionedRecyclerViewAdapter = new SectionedRecyclerViewAdapter(getApplicationContext(),
R.layout.layout_list_section, R.id.textViewItemSection, myAdapter, this);
sectionedRecyclerViewAdapter.setSections(list);
recyclerView.setAdapter(sectionedRecyclerViewAdapter);
}
//-------------------Adapter----------------------------
public class MyAdapter extends RecyclerView.Adapter<MyViewHolder> implements MyViewHolder.ViewHolderClickListener {
@Override
public int getItemCount() {
return list.size();
}
@Override
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.
from(parent.getContext()).
inflate(R.layout.layout_list_item, parent, false);
return new MyViewHolder(itemView,this);
}
@Override
public void onBindViewHolder(MyViewHolder holder, final int position) {
AnimalObject animalObject = list.get(position);
holder.title.setText(animalObject.name);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// checkbox.setChecked(true);
row_index = position;
notifyDataSetChanged();
}
});
if (row_index == position) {
holder.checkBox.setChecked(true);
} else {
holder.checkBox.setChecked(false);
}
}
@Override
public void onClick(View v) {
Toast.makeText(getApplicationContext(), list.get(sectionedRecyclerViewAdapter.getIndexForPosition(recyclerView.getChildPosition(v))).name,Toast.LENGTH_SHORT).show();
}
}
// Adapter
public String name;
public String type;
public boolean ischecked ;
public AnimalObject(final String name, final String type, boolean ischecked){
this.name = name ;
this.type = type ;
this.ischecked = ischecked;
}
public boolean ischecked() {
return ischecked;
}
public void setIschecked(boolean ischecked) {
this.ischecked = ischecked;
}
java android android-recyclerview android-checkbox
java android android-recyclerview android-checkbox
edited Nov 22 at 10:18
asked Nov 22 at 9:54
cole
1,1112816
1,1112816
It's Single item choice selection. You can manage it by declaring position = -1 and check your adapter position while clicking on it.
– Piyush
Nov 22 at 9:56
It is very likely the problem is within the adapter, can you post the code of your adapter?
– Aaron
Nov 22 at 9:59
@Piyush I am not sure how to tell which checkbox to setSelected false.
– cole
Nov 22 at 10:06
@Aaron I updated my question with adapter class added
– cole
Nov 22 at 10:06
@code Weird.. I don't see them.. and your ViewHolder is incomplete, anyway I just want to make sure that you bind the views correctly.
– Aaron
Nov 22 at 10:09
|
show 1 more comment
It's Single item choice selection. You can manage it by declaring position = -1 and check your adapter position while clicking on it.
– Piyush
Nov 22 at 9:56
It is very likely the problem is within the adapter, can you post the code of your adapter?
– Aaron
Nov 22 at 9:59
@Piyush I am not sure how to tell which checkbox to setSelected false.
– cole
Nov 22 at 10:06
@Aaron I updated my question with adapter class added
– cole
Nov 22 at 10:06
@code Weird.. I don't see them.. and your ViewHolder is incomplete, anyway I just want to make sure that you bind the views correctly.
– Aaron
Nov 22 at 10:09
It's Single item choice selection. You can manage it by declaring position = -1 and check your adapter position while clicking on it.
– Piyush
Nov 22 at 9:56
It's Single item choice selection. You can manage it by declaring position = -1 and check your adapter position while clicking on it.
– Piyush
Nov 22 at 9:56
It is very likely the problem is within the adapter, can you post the code of your adapter?
– Aaron
Nov 22 at 9:59
It is very likely the problem is within the adapter, can you post the code of your adapter?
– Aaron
Nov 22 at 9:59
@Piyush I am not sure how to tell which checkbox to setSelected false.
– cole
Nov 22 at 10:06
@Piyush I am not sure how to tell which checkbox to setSelected false.
– cole
Nov 22 at 10:06
@Aaron I updated my question with adapter class added
– cole
Nov 22 at 10:06
@Aaron I updated my question with adapter class added
– cole
Nov 22 at 10:06
@code Weird.. I don't see them.. and your ViewHolder is incomplete, anyway I just want to make sure that you bind the views correctly.
– Aaron
Nov 22 at 10:09
@code Weird.. I don't see them.. and your ViewHolder is incomplete, anyway I just want to make sure that you bind the views correctly.
– Aaron
Nov 22 at 10:09
|
show 1 more comment
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
Inside your Adapter
use this :private int row_index;
@Override
public void onBindViewHolder(final Main_Page_Payment_Cash_Adapter.ViewHolder holder, final int position) {
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// checkbox.setChecked(true);
row_index = position;
notifyDataSetChanged();
}
});
if (row_index == position) {
// checkbox.setChecked(true);
} else {
// checkbox.setChecked(false);
}
}
I hope this is what you are looking for.
Thanks Hossam. But I could not see it working. I want to deselect any previous ticked checkbox.
– cole
Nov 22 at 10:17
1
Managed to run your code and its working now !! Thanks and enjoy some good points.
– cole
Nov 22 at 10:24
what didnt work for you to update the answer to help the others :)
– Hossam Hassan
Nov 22 at 10:47
add a comment |
up vote
1
down vote
@Override
public void onBindViewHolder(MyViewHolder holder, final int position) {
AnimalObject animalObject = list.get(position);
holder.title.setText(animalObject.name);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AnimalObject animalObject = list.get(position);
int currentCheckedStatus = animalObject.ischecked();
for (int i =0;i<list.size();i++)
{
if (i==position)
{
animalObject.setIschecked(!currentCheckedStatus);
}
else
{
animalObject.setIschecked(false);
}
}
notifyDataSetChanged();
}
});
holder.checkBox.setChecked(animalObject.ischecked());
}
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Inside your Adapter
use this :private int row_index;
@Override
public void onBindViewHolder(final Main_Page_Payment_Cash_Adapter.ViewHolder holder, final int position) {
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// checkbox.setChecked(true);
row_index = position;
notifyDataSetChanged();
}
});
if (row_index == position) {
// checkbox.setChecked(true);
} else {
// checkbox.setChecked(false);
}
}
I hope this is what you are looking for.
Thanks Hossam. But I could not see it working. I want to deselect any previous ticked checkbox.
– cole
Nov 22 at 10:17
1
Managed to run your code and its working now !! Thanks and enjoy some good points.
– cole
Nov 22 at 10:24
what didnt work for you to update the answer to help the others :)
– Hossam Hassan
Nov 22 at 10:47
add a comment |
up vote
1
down vote
accepted
Inside your Adapter
use this :private int row_index;
@Override
public void onBindViewHolder(final Main_Page_Payment_Cash_Adapter.ViewHolder holder, final int position) {
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// checkbox.setChecked(true);
row_index = position;
notifyDataSetChanged();
}
});
if (row_index == position) {
// checkbox.setChecked(true);
} else {
// checkbox.setChecked(false);
}
}
I hope this is what you are looking for.
Thanks Hossam. But I could not see it working. I want to deselect any previous ticked checkbox.
– cole
Nov 22 at 10:17
1
Managed to run your code and its working now !! Thanks and enjoy some good points.
– cole
Nov 22 at 10:24
what didnt work for you to update the answer to help the others :)
– Hossam Hassan
Nov 22 at 10:47
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Inside your Adapter
use this :private int row_index;
@Override
public void onBindViewHolder(final Main_Page_Payment_Cash_Adapter.ViewHolder holder, final int position) {
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// checkbox.setChecked(true);
row_index = position;
notifyDataSetChanged();
}
});
if (row_index == position) {
// checkbox.setChecked(true);
} else {
// checkbox.setChecked(false);
}
}
I hope this is what you are looking for.
Inside your Adapter
use this :private int row_index;
@Override
public void onBindViewHolder(final Main_Page_Payment_Cash_Adapter.ViewHolder holder, final int position) {
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// checkbox.setChecked(true);
row_index = position;
notifyDataSetChanged();
}
});
if (row_index == position) {
// checkbox.setChecked(true);
} else {
// checkbox.setChecked(false);
}
}
I hope this is what you are looking for.
answered Nov 22 at 10:05
Hossam Hassan
128115
128115
Thanks Hossam. But I could not see it working. I want to deselect any previous ticked checkbox.
– cole
Nov 22 at 10:17
1
Managed to run your code and its working now !! Thanks and enjoy some good points.
– cole
Nov 22 at 10:24
what didnt work for you to update the answer to help the others :)
– Hossam Hassan
Nov 22 at 10:47
add a comment |
Thanks Hossam. But I could not see it working. I want to deselect any previous ticked checkbox.
– cole
Nov 22 at 10:17
1
Managed to run your code and its working now !! Thanks and enjoy some good points.
– cole
Nov 22 at 10:24
what didnt work for you to update the answer to help the others :)
– Hossam Hassan
Nov 22 at 10:47
Thanks Hossam. But I could not see it working. I want to deselect any previous ticked checkbox.
– cole
Nov 22 at 10:17
Thanks Hossam. But I could not see it working. I want to deselect any previous ticked checkbox.
– cole
Nov 22 at 10:17
1
1
Managed to run your code and its working now !! Thanks and enjoy some good points.
– cole
Nov 22 at 10:24
Managed to run your code and its working now !! Thanks and enjoy some good points.
– cole
Nov 22 at 10:24
what didnt work for you to update the answer to help the others :)
– Hossam Hassan
Nov 22 at 10:47
what didnt work for you to update the answer to help the others :)
– Hossam Hassan
Nov 22 at 10:47
add a comment |
up vote
1
down vote
@Override
public void onBindViewHolder(MyViewHolder holder, final int position) {
AnimalObject animalObject = list.get(position);
holder.title.setText(animalObject.name);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AnimalObject animalObject = list.get(position);
int currentCheckedStatus = animalObject.ischecked();
for (int i =0;i<list.size();i++)
{
if (i==position)
{
animalObject.setIschecked(!currentCheckedStatus);
}
else
{
animalObject.setIschecked(false);
}
}
notifyDataSetChanged();
}
});
holder.checkBox.setChecked(animalObject.ischecked());
}
add a comment |
up vote
1
down vote
@Override
public void onBindViewHolder(MyViewHolder holder, final int position) {
AnimalObject animalObject = list.get(position);
holder.title.setText(animalObject.name);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AnimalObject animalObject = list.get(position);
int currentCheckedStatus = animalObject.ischecked();
for (int i =0;i<list.size();i++)
{
if (i==position)
{
animalObject.setIschecked(!currentCheckedStatus);
}
else
{
animalObject.setIschecked(false);
}
}
notifyDataSetChanged();
}
});
holder.checkBox.setChecked(animalObject.ischecked());
}
add a comment |
up vote
1
down vote
up vote
1
down vote
@Override
public void onBindViewHolder(MyViewHolder holder, final int position) {
AnimalObject animalObject = list.get(position);
holder.title.setText(animalObject.name);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AnimalObject animalObject = list.get(position);
int currentCheckedStatus = animalObject.ischecked();
for (int i =0;i<list.size();i++)
{
if (i==position)
{
animalObject.setIschecked(!currentCheckedStatus);
}
else
{
animalObject.setIschecked(false);
}
}
notifyDataSetChanged();
}
});
holder.checkBox.setChecked(animalObject.ischecked());
}
@Override
public void onBindViewHolder(MyViewHolder holder, final int position) {
AnimalObject animalObject = list.get(position);
holder.title.setText(animalObject.name);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AnimalObject animalObject = list.get(position);
int currentCheckedStatus = animalObject.ischecked();
for (int i =0;i<list.size();i++)
{
if (i==position)
{
animalObject.setIschecked(!currentCheckedStatus);
}
else
{
animalObject.setIschecked(false);
}
}
notifyDataSetChanged();
}
});
holder.checkBox.setChecked(animalObject.ischecked());
}
answered Nov 22 at 10:30
Farman Ali Khan
299311
299311
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53428224%2fselect-one-checkbox-in-item-from-recyclerview-and-deselect-previously-selected-c%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It's Single item choice selection. You can manage it by declaring position = -1 and check your adapter position while clicking on it.
– Piyush
Nov 22 at 9:56
It is very likely the problem is within the adapter, can you post the code of your adapter?
– Aaron
Nov 22 at 9:59
@Piyush I am not sure how to tell which checkbox to setSelected false.
– cole
Nov 22 at 10:06
@Aaron I updated my question with adapter class added
– cole
Nov 22 at 10:06
@code Weird.. I don't see them.. and your ViewHolder is incomplete, anyway I just want to make sure that you bind the views correctly.
– Aaron
Nov 22 at 10:09