title: Case statement is outside switch
body: <p>I'm doing some experimenting trying to get a toggle button to move a image view depending on if the button is pressed or not. currently it is stating that the case is outside of the switch and I'm not sure how to fix it.</p>
  
  <pre><code>switch(v.getId())
  
  {
      case R.id.moveButton: {
  
  
          boolean check = ((ToggleButton) v).isChecked();
          if (check) {
              ImageView img_animationOne = (ImageView) findViewById(R.id.player);
  
              TranslateAnimation animation = new TranslateAnimation(.0f, 200.0f,
                      0.0f, 0.0f);
              animation.setDuration(1000);
              animation.setRepeatCount(1);
              animation.setRepeatMode(2);
              animation.setFillAfter(true);
              img_animationOne.startAnimation(animation);
  
          } else {
              ImageView img_animationOne = (ImageView) findViewById(R.id.player);
  
              TranslateAnimation animation = new TranslateAnimation(200.0f, 0.0f,
                      0.0f, 0.0f);
              animation.setDuration(1000);
              animation.setRepeatCount(1);
              animation.setRepeatMode(2);
              animation.setFillAfter(true);
              img_animationOne.startAnimation(animation);
  
          }
  
      }
  }
  </code></pre>