title: Method 'onCheckboxClicked(android.view.View)' is never used
body: <p>Thank you guys for all the help!</p>
  
  <p>Now I have updated my code and there's no error in it. But when I run the application it crashes when I try to swipe to this fragment. Is there anything missing in this code or is it something else in my app that causes this problem?</p>
  
  <pre><code>package hej.swipeview;
  
  import android.os.Bundle;
  import android.support.v4.app.Fragment;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.CheckBox;
  import android.widget.ImageView;
  
  
  public class FörstängningFragment extends Fragment {
  
  
  int checkOne = '0';
  int checkTwo = '0';
  int checkThree = '0';
  ImageView bild = (ImageView)
          getView().findViewById(R.id.forstangningimage);
  
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  
      View rootView = inflater.inflate(R.layout.fragment_forstangning, container, false);
      bild = (ImageView) rootView.findViewById(R.id.forstangningimage);
      bild.setImageResource(R.drawable.forstangning);
      CheckBox c = (CheckBox) rootView.findViewById(R.id.checkboxbak);
      CheckBox c2 = (CheckBox) rootView.findViewById(R.id.checkBox2);
      CheckBox c3 = (CheckBox) rootView.findViewById(R.id.checkBox3);
  
  
      c.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              boolean checked = ((CheckBox) v).isChecked();
              switch (v.getId()) {
  
                  case R.id.checkboxbak:
  
                      if (checked) {
                          checkOne = '1';
                          changeImage();
                      } else {
                          checkOne = '0';
                          changeImage();
                      }
                      break;
              }
              onClick(v);
          }
      });
      c2.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
  
              boolean checked = ((CheckBox) v).isChecked();
              switch (v.getId()) {
  
                  case R.id.checkBox2:
                      if (checked) {
                          checkTwo = '1';
                          changeImage();
                      } else {
                          checkTwo = '0';
                          changeImage();
                      }
                      break;
              }
              onClick(v);
          }
      });
      c3.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              boolean checked = ((CheckBox) v).isChecked();
              switch (v.getId()) {
  
                  case R.id.checkBox3:
                      if (checked) {
                          checkThree = '1';
                          changeImage();
                      } else {
                          checkThree = '0';
                          changeImage();
                      }
                      break;
              }
  
              onClick(v);
          }
      });
  
  
      changeImage();
      {
  
          if (checkOne != '1' &amp;&amp; checkTwo != '1' &amp;&amp; checkThree != '1') {
  
              bild.setImageResource(R.drawable.forstangning);
          } else {
  
              if (checkOne == '1') {
                  bild.setImageResource(R.drawable.splash2);
              } else if (checkOne == '1' &amp;&amp; checkTwo == '1' &amp;&amp; checkThree == '0') {
                  bild.setImageResource(R.drawable.dimensioner);
              } else if (checkOne == '1' &amp;&amp; checkTwo == '1' &amp;&amp; checkThree == '1') {
                  bild.setImageResource(R.drawable.lastmonster);
              } else if (checkOne == '1' &amp;&amp; checkTwo == '0' &amp;&amp; checkThree == '1') {
                  bild.setImageResource(R.drawable.ic_launcher);
              } else if (checkOne == '0' &amp;&amp; checkTwo == '1' &amp;&amp; checkThree == '0') {
                  bild.setImageResource(R.drawable.ic_launcher);
              } else if (checkOne == '0' &amp;&amp; checkTwo == '1' &amp;&amp; checkThree == '1') {
                  bild.setImageResource(R.drawable.ic_launcher);
              } else if (checkOne == '0' &amp;&amp; checkTwo == '0' &amp;&amp; checkThree == '1') {
                  bild.setImageResource(R.drawable.ic_launcher);
              }
          }
  
      }
      return rootView;
  }
  
  private void changeImage() {
  
  
  }
  
  }
  </code></pre>