title: Android: Is there another way to display data from a string array?
body: <p>I am trying to display the steps to a recipe, the recipe is stored in a string array. </p>
  
  <p>Im trying to get each step to be inserted into a text view, and have the following code:</p>
  
  <pre><code>public class MethodActivity extends ListActivity{
  
  ListView recipes;
  Intent myIntent;
  String value;
  TextView editvalue;
  Intent intent;
  
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);  
  
  
      setContentView(R.layout.recipemethod);
  
      editvalue = (TextView)findViewById(R.id.method);
      value = getIntent().getStringExtra("searchValue");
      editvalue.setText(value);
  
      final String[]  words = getResources().getStringArray(R.array.Lasagna);
      final TextView tw=(TextView)findViewById(R.id.method);
      for(int item = 0;item&lt;words.length;item++){
          tw.setText(words [item]);
      }
    }
  }
  </code></pre>
  
  <p>I am also wanting to make it dynamic so does anyone know how I can do that? (e.g. depending on what the user clicked that recipe is shown). </p>
  
  <p>Thanks </p>