GetView
2016-01-26 15:54:18 GMT [INF] [23418] Starting 100% backup of 127.0.0.1:3000 (namespace: test, set: [all], bins: [all]) to [stdout]
2016-01-26 15:54:18 GMT [INF] [23418] [src/main/aerospike/as_cluster.c:415][as_cluster_seed_nodes] Add node BB90600F00A0142 127.0.0.1:3000
2016-01-26 15:54:18 GMT [INF] [23418] [src/main/aerospike/as_cluster.c:475][as_cluster_find_nodes_to_add] Duplicate node found BB90600F00A0142 127.0.0.1:3000
2016-01-26 15:54:18 GMT [INF] [23418] [src/main/aerospike/as_cluster.c:483][as_cluster_find_nodes_to_add] Add node BB91B00F00A0142 10.240.0.27:3000
2016-01-26 15:54:18 GMT [INF] [23418] [src/main/aerospike/as_cluster.c:483][as_cluster_find_nodes_to_add] Add node BB90500F00A0142 10.240.0.5:3000
2016-01-26 15:54:18 GMT [INF] [23418] [src/main/aerospike/as_cluster.c:483][as_cluster_find_nodes_to_add] Add node BB90D00F00A0142 10.240.0.13:3000
2016-01-26 15:54:18 GMT [INF] [23418] [src/main/aerospike/as_cluster.c:483][as_cluster_find_nodes_to_add] Add node BB90E00F00A0142 10.240.0.14:3000
2016-01-26 15:54:18 GMT [INF] [23418] [src/main/aerospike/as_cluster.c:483][as_cluster_find_nodes_to_add] Add node BB91700F00A0142 10.240.0.23:3000
2016-01-26 15:54:18 GMT [INF] [23418] [src/main/aerospike/as_cluster.c:483][as_cluster_find_nodes_to_add] Add node BB91800F00A0142 10.240.0.24:3000
2016-01-26 15:54:18 GMT [INF] [23418] [src/main/aerospike/as_cluster.c:475][as_cluster_find_nodes_to_add] Duplicate node found BB90600F00A0142 127.0.0.1:3000
2016-01-26 15:54:18 GMT [INF] [23418] Processing 7 node(s)
2016-01-26 15:54:18 GMT [INF] [23418] Node ID Objects Replication
2016-01-26 15:54:18 GMT [INF] [23418] BB90600F00A0142 5897565 3
2016-01-26 15:54:18 GMT [INF] [23418] BB91B00F00A0142 5957713 3
2016-01-26 15:54:18 GMT [INF] [23418] BB90500F00A0142 5956161 3
2016-01-26 15:54:18 GMT [INF] [23418] BB90D00F00A0142 5955580 3
2016-01-26 15:54:18 GMT [INF] [23418] BB90E00F00A0142 5879393 3
2016-01-26 15:54:18 GMT [INF] [23418] BB91700F00A0142 5923271 3
2016-01-26 15:54:18 GMT [INF] [23418] BB91800F00A0142 5936997 3
2016-01-26 15:54:18 GMT [INF] [23418] Namespace contains 13835560 record(s)
2016-01-26 15:54:18 GMT [INF] [23453] Starting backup for node BB90600F00A0142
2016-01-26 15:54:18 GMT [INF] [23453] No secondary indexes
2016-01-26 15:54:18 GMT [INF] [23453] Backing up 0 UDF file(s)
Version 3.1
# namespace test
# first-file
+ k B 8 ADhSgg==
+ n test
+ d GmBtCbKAyOCJkFjeYld+6JOvLEU=
+ s linksd
+ g 1
+ t 0
+ b 1
- B value 8 AAibxA==
+ k B 8 AGJkEA==
+ n test
+ d GqDqbia17QaG5dEpmyBcTGv5JiI=
+ s index
+ g 133
+ t 0
+ b 1
createButtonRow
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ConditionChecklist conditionChecklist;
View view = convertView;
switch (getItemViewType(position)) {
case 0:
conditionChecklist = mConditionCheckListArray.get(position);
view = createDropdownRow(conditionChecklist, convertView, parent);
break;
case 1:
conditionChecklist = mConditionCheckListArray.get(position);
view = createButtonRow(conditionChecklist, convertView, parent);
break;
}
return view;
}
setButtonRowListeners
public View createButtonRow(ConditionChecklist conditionChecklist, View convertView, ViewGroup parent) {
ButtonHolder buttonHolder;
if (convertView != null) {
buttonHolder = (ButtonHolder) convertView.getTag();
} else {
convertView = LayoutInflater.from(mContext).inflate(R.layout.condition_button_row, parent, false);
buttonHolder = new ButtonHolder();
buttonHolder.title = (TextView) convertView.findViewById(R.id.button_row_title);
buttonHolder.yes = (Button) convertView.findViewById(R.id.button_row_yes);
buttonHolder.no = (Button) convertView.findViewById(R.id.button_row_no);
buttonHolder.subQuestion = (AutoCompleteTextView) convertView.findViewById(R.id.button_row_autocomplete);
convertView.setTag(buttonHolder);
}
buttonHolder.title.setText(conditionChecklist.getQuestion());
setButtonRowListeners(buttonHolder);
setButtonRowAdapters(buttonHolder);
return convertView;
}
当我点击任何是或否按钮时,它突出显示屏幕上的按钮。因此,当我向下滚动时,下面的行中的按钮已经突出显示。我知道这是因为ViewHolder正在回收我的观点。我如何确保只点击我点击的视图?
答案 0 :(得分:1)
就像你自己说的那样:意见得到回收。
所以当得到一个新的"使用createButtonRow()
行,您需要通过点击按钮更新您正在更改的观看次数。
此外,您似乎正在使用buttonHolder
来存储状态。这根本不应该完成。你需要将状态存储在其他地方,因为每次视图被回收你都会失去状态。