|
|
@ -96,10 +96,12 @@ public class RuleActivity extends BaseActivity { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void initRuleList() { |
|
|
|
protected void initRuleList() { |
|
|
|
mAdapter = new ReplaceRuleAdapter(this, (which, data) -> { |
|
|
|
mAdapter = new ReplaceRuleAdapter(this, which -> { |
|
|
|
mReplaceRules.remove(data); |
|
|
|
mReplaceRules.remove(which); |
|
|
|
|
|
|
|
mAdapter.removeItem(which); |
|
|
|
mAdapter.notifyItemRemoved(which); |
|
|
|
mAdapter.notifyItemRemoved(which); |
|
|
|
mAdapter.removeItem2(data); |
|
|
|
if(which != mReplaceRules.size()) |
|
|
|
|
|
|
|
mAdapter.notifyItemRangeChanged(which, mReplaceRules.size() - which); |
|
|
|
setUpBarTitle(); |
|
|
|
setUpBarTitle(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
rvRuleList.setLayoutManager(new LinearLayoutManager(this)); |
|
|
|
rvRuleList.setLayoutManager(new LinearLayoutManager(this)); |
|
|
|