0
我用ListView
和CheckBox
来创建一个复选框ListView
但我想在某些情况下显示/隐藏一些CheckBoxes
。我能怎么做?如何显示/隐藏ListView中的一些复选框
我用ListView
和CheckBox
来创建一个复选框ListView
但我想在某些情况下显示/隐藏一些CheckBoxes
。我能怎么做?如何显示/隐藏ListView中的一些复选框
实现您自己的自定义适配器可能会实现您想要的。 延伸BaseAdapter
并实施抽象方法getView
。
public class YourListAdapter extends BaseAdapter{
public View getView(int position, View convertView, ViewGroup parent) {
}
}
参考:http://developer.android.com/reference/android/widget/BaseAdapter.html
这里
可能的解决方案:http://stackoverflow.com/questions/5052288/how-can-i-hide-show-an-element-when-a-button-is -pressed – Th0rndike 2012-03-08 09:09:20