title: Checkbox default value & OnCheckedChangeListener
body: <p>This is not so much of a problem but I am trying to find a correct way of doing this.</p>
  
  <p>I have the following situation:</p>
  
  <pre><code>public class SettingsDialogFragment extends DialogFragment implements OnCheckedChangeListener {
  
  ...
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
      View view = inflater.inflate(R.layout.settings, container);
  
      ...
  
      CheckBox lBox1  = (CheckBox)view.findViewById(R.id.checkBox1);
  
      lBox1.setOnCheckedChangeListener(this);
      lBox1.setChecked(true);
  
      return view;
  }
  
  @Override
  public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
  
      ....
  
  }
  </code></pre>
  
  <p>The "problem" I have is that by calling <code>setChecked(true)</code> the onCheckChanged will already fire. I guess that when I inflate the layout - the <code>CheckBox</code> is initialised with a false setting and me changing that to true indeed is a <code>CheckedChanged</code> event.</p>
  
  <p>I could of course change the order and assign the listener after I set the initial value, but is there a way to inflate the layout whilst somehow passing the initial values for the various components? They are dynamic so I cannot fix the values to a particular value in the settings.xml</p>
  
  <p>Cheers</p>