+ private static class OnCheckedChangeListener implements android.widget.CompoundButton.OnCheckedChangeListener{
+ private final LinearLayout layout;
+ private final View root;
+ public OnCheckedChangeListener(final LinearLayout layout, final View root){
+ this.layout=layout;
+ this.root=root;
+ }
+
+ @Override
+ public void onCheckedChanged(final CompoundButton buttonView, final boolean isChecked) {
+ if(isChecked) {
+ Utils.setEnabledRecursively(layout, true);
+ final Spinner repeatType = (Spinner) root.findViewById(R.id.repeat_type);
+ repeatType.setOnItemSelectedListener(new OnItemSelectedListener(root.findViewById(R.id.repeat_count)));
+ }else {
+ Utils.setEnabledRecursively(layout, false);
+ }
+ }
+ }
+
+ public static final String ARGUMENT_LAYOUT="layout";
+