Refactoring

This commit is contained in:
M66B 2017-03-19 14:42:41 +01:00
parent 4c2fc42ba9
commit aa449c3a80
1 changed files with 5 additions and 5 deletions

View File

@ -499,17 +499,17 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> im
}
});
// Show mobile screen on condition
holder.llScreenOther.setVisibility(screen_on ? View.VISIBLE : View.GONE);
holder.cbScreenOther.setEnabled(rule.other_blocked && rule.apply);
holder.cbScreenOther.setOnCheckedChangeListener(null);
holder.cbScreenOther.setChecked(rule.screen_other);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
Drawable wrap = DrawableCompat.wrap(holder.ivOtherLegend.getDrawable());
DrawableCompat.setTint(wrap, colorOn);
}
// Show mobile screen on condition
holder.llScreenOther.setVisibility(screen_on ? View.VISIBLE : View.GONE);
holder.cbScreenOther.setEnabled(rule.other_blocked && rule.apply);
holder.cbScreenOther.setOnCheckedChangeListener(null);
holder.cbScreenOther.setChecked(rule.screen_other);
holder.cbScreenOther.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {