title: Resource Not Found Exception
body: <p>I am getting the Resource Not Found Exception in the line where I refer to one of my class methods that maps an <code>EditText</code> object. I don't understand why I am getting this problem.</p>
  
  <p>I have a simple java class named <code>store.java</code> that just maps the data from the spinners and <code>EditText.</code> and a class called <code>SpinPizza.java</code> that prints their value.</p>
  
  <p><strong>Store.java</strong></p>
  
  <pre><code>package com.Lak;
  
  import android.os.Parcel;
  import android.os.Parcelable;
  
  public class store implements Parcelable {
  
      @SuppressWarnings("rawtypes")
      public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
          public store createFromParcel(Parcel in) {
              return new store(in);
          }
  
          public store[] newArray(int size) {
              return new store[size];
          }
      };
      private static final long serialVersionUID = 1L;
      private String pizzaname;
      private String pizzasize;
      private int n;
  
      public store() {
      }
  
      public store(Parcel source) {
            /*
             * Reconstruct from the Parcel
             */
          n = source.readInt();
          pizzaname = source.readString();
          pizzasize = source.readString();
      }
  
      public void setOrder(String name, String size, int qty) {
          pizzaname = name;
          pizzasize = size;
          n = qty;
      }
  
      public String getPizzaName() {
          return pizzaname;
      }
  
      public int getQuantity() {
          return n;
      }
  
      public String getPizzaSize() {
          return pizzasize;
      }
  
      public int describeContents() {
          return 0;
      }
  
      public void writeToParcel(Parcel dest, int flags) {
  
          dest.writeInt(n);
          dest.writeString(pizzaname);
          dest.writeString(pizzasize);
      }
  
      /** Called when the activity is first created. */
  }
  </code></pre>
  
  <p><strong>SpinPizza.java</strong></p>
  
  <pre><code>package com.Lak;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.KeyEvent;
  import android.view.View;
  import android.view.View.OnKeyListener;
  import android.widget.ArrayAdapter;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.Spinner;
  import android.widget.TextView;
  import android.widget.Toast;
  
  public class SpinPizza extends Activity {
  
      private static final long serialVersionUID = 1L;
      store B[] = new store[10];
      int n, i, num;
      Spinner s = null, s1 = null;
      EditText edittext = null;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.drop);
  
          s = (Spinner) findViewById(R.id.spinner);
  
          ArrayAdapter&lt;?&gt; adapter = ArrayAdapter.createFromResource(this, R.array.pizzaarray, android.R.layout.simple_spinner_item);
          adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
          s.setAdapter(adapter);
  
          s1 = (Spinner) findViewById(R.id.spinner1);
          ArrayAdapter&lt;?&gt; adapter1 = ArrayAdapter.createFromResource(this, R.array.sizearray, android.R.layout.simple_spinner_item);
          adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
          s1.setAdapter(adapter1);
  
          edittext = (EditText) findViewById(R.id.edittext);
          i = 0;
          edittext.setOnKeyListener(new OnKeyListener() {
              public boolean onKey(View v, int keyCode, KeyEvent event) {
                  // If the event is a key-down event on the "enter" button
                  if ((event.getAction() == KeyEvent.ACTION_DOWN) &amp;&amp; 
                          (keyCode == KeyEvent.KEYCODE_ENTER || keyCode == KeyEvent.KEYCODE_DPAD_CENTER)) {
                      // Perform action on key press
  
                      B[i] = new store();
                      //n=Integer.parseInt(edittext.getText().toString());
  
                      // num = Float.valueOf(edittext.getText().toString());
  
                      try {
                          num = Integer.parseInt(edittext.getText().toString());
                      } catch (NumberFormatException nfe) {
                          System.out.println("Could not parse " + nfe);
                      }
  
                      B[i].setOrder(s.getSelectedItem().toString(), s1.getSelectedItem().toString(), num);
  
                      TextView objText = (TextView) findViewById(R.id.pl);
                      TextView objText1 = (TextView) findViewById(R.id.pl2);
                      TextView objText2 = (TextView) findViewById(R.id.pl3);
  
                      objText.setText(B[i].getPizzaName());
                      objText1.setText(B[i].getPizzaSize());
                      objText2.setText(B[i].getQuantity());  //**RESOURCE NOT FOUND EXCEPTION**
                      i++;
  
                      Toast.makeText(SpinPizza.this, edittext.getText(), Toast.LENGTH_SHORT).show();
  
                      return true;
                  }
                  return false;
              }
          });
  
          Button next1 = (Button) findViewById(R.id.bill);
  
          next1.setOnClickListener(new View.OnClickListener() {
              public void onClick(View view) {
                  Intent myIntent = new Intent(view.getContext(), Bill.class);
                  // store B= new store();
                  myIntent.putExtra("myclass", B);
                  myIntent.putExtra("len", i);
                  int j;
  
                  for (j = 0; j &lt; i; j++)
                  //{myIntent.putExtra("my",s.getSelectedItem().toString());
                  // myIntent.putExtra("my1",s1.getSelectedItem().toString());
                  // }
                  {
                      myIntent.putExtra("my", B[j].getPizzaName());
                      myIntent.putExtra("my1", B[j].getPizzaSize());
                      myIntent.putExtra("my2", B[j].getQuantity());
                  }
  
                  startActivityForResult(myIntent, 0);
              }
          });
      }
  }
  </code></pre>