title: numbered images on setImageResource
body: <p>I'm working on an Android App, and I had the following code:</p>
  
  <pre><code>int digit = 0;
  imageButton = (ImageView)findViewById(R.id.btn1);
  numberedImage = (ImageView)findViewById(R.id.Digit1);
  
  imageButton.setOnClickListener(new OnClickListener()
  {
      public void onClick(View v)
          {
               digit++;
               numberedImage.setImageResource(R.drawable.number + ((digit) + 1));
          }
  });
  </code></pre>
  
  <p>and some images on a drawable folder called <code>number1</code>, <code>number2</code>, and so on...
  This code was working perfectly, and then, suddenly, it's not working anymore.</p>
  
  <p>I want the <code>ImageView</code> to change the images each click, and what made me completely confused, is the fact that this code was working completely fine (even though it might be wrong some way, I'm not a programmer), and all of the sudden, it's not anymore...</p>
  
  <p>After that I also tried using arrays and loops, but I encountered the same error:</p>
  
  <blockquote>
    <p>"number cannot be resolved or is not a field"</p>
  </blockquote>
  
  <p>which wasn't a problem before.</p>