title: Setting OnCheckedChangeListener with a Lambda
body: <p>I want to use a lambda rather than an anonymous class for OnCheckedChangeListener. </p>
  
  <p>The original code for setting the listener works fine and reads:</p>
  
  <pre><code>mCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
      @Override
      public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
          mCrime.setSolved(isChecked);
      }
  });
  </code></pre>
  
  <p>I tried changing it to a lambda by doing:</p>
  
  <pre><code>mCheckBox.setOnCheckedChangeListener(l -&gt; mCrime.setSolved(isChecked));
  </code></pre>
  
  <p>but I receive an error from Android Studio saying: cannot resolve symbol is checked. </p>
  
  <p>I had thought a lambda would resolve isChecked implicitly even though the onCheckChanged takes two arguments. What is wrong with my understanding?</p>