Custom ListView with a Checkbox and a Spinner
I need to make a ListView with this specific attributes:
1) Every row has a CheckBox on the left and a Spinner on the right;
2) The Spinner is active and selectable of and only if the correlated CheckBox is checked.
I've managed to achieve (1) using a SimpleAdapter and a ViewBinder.
I'm also able to put a onClickListener to every CheckBox using the ViewBinder, like this:
myCheckBox.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (myCheckBox.isChecked()) //call the "enable spinner" function;
}
});
The problem is that I don't know how to find the right Spinner开发者_Python百科 from the "enable spinner" function. What is the best way to achieve this?
加载中,请稍侯......
精彩评论