我想点击一个加号按钮,添加RecyclerView
视图并刷新之前的视图。
每个视图都有微调器。因此,当单击加号按钮时,前一个微调器值应该保留。
addNewAction.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
addQuickActionDataList.add(position,new AddQuickActionData());
AddNewQuickActionAdapter adapter = new AddNewQuickActionAdapter(
NewQuickAction.this,addQuickActionDataList,uDeviceList,
uRoomList);
recyclerView.setAdapter(adapter);
position++;
}
});
@Override public void onBindViewHolder(final RecyclerView.ViewHolder holder, final int position) {
if (holder instanceof MyViewHolder) {
final AddQuickActionData list = (AddQuickActionData)addQuickActionDataList.get(position);
}
}