title: make text view for every item in Arraylist
body: <p>I'm making application that send a String Array list to another activity and in the another activity it takes all the items and make text view for every item but i don't know how to do it.</p>
  
  <p>this is my first activity code:</p>
  
  <pre><code>package com.TOF.versus;
  import android.content.Intent;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.KeyEvent;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.TextView;
  import java.util.ArrayList;
  public class MainActivity extends AppCompatActivity{
      Button exitBtn;
      EditText namesTxt;
      TextView namesNumber;
      Button namesBtn;
      @Override
      protected void onCreate(Bundle savedInstanceState)  {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          exitBtn=(Button) findViewById(R.id.exitBtn);
          exitBtn.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  finish();
              }
          });
          namesNumber=(TextView)findViewById(R.id.namesNumber);
          namesTxt = (EditText) findViewById(R.id.namesTxt);
          namesBtn=(Button)findViewById(R.id.namesBtn);
          inputName();
      }
      public void inputName(){
          final ArrayList &lt;String&gt; names= new ArrayList&lt;String&gt;();
          namesTxt.setSingleLine();
          namesTxt.setOnKeyListener(new View.OnKeyListener() {
              public boolean onKey(View v, int keyCode, KeyEvent event) {
                  if ((event.getAction() == KeyEvent.ACTION_DOWN) &amp;&amp; (keyCode == KeyEvent.KEYCODE_ENTER)) {
                      names.add(namesTxt.getText().toString());
                      namesNumber.setText(Integer.toString(names.size()));
                      namesTxt.setText("");
                      namesBtn.setOnClickListener(new View.OnClickListener() {
                          public void onClick(View v) {
                              Intent send = new Intent(v.getContext(), Names.class);
                              send.putStringArrayListExtra("E",names);
                              startActivity(send);
                          }
                      });
                  }
                  return false;
              }});}} 
  </code></pre>
  
  <p>and this the second activity code that i don't know how to make the text view for :</p>
  
  <pre><code>package com.TOF.versus;
  
  
  import android.content.Intent;
  import android.os.Bundle;
  import android.support.v7.app.ActionBar;
  import android.support.v7.app.AppCompatActivity;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.Button;
  import android.widget.RelativeLayout;
  import android.widget.TextView;
  
  import java.util.ArrayList;
  
  public class Names extends AppCompatActivity {
      Button backBtn;
      RelativeLayout names_layout;
      protected void onCreate(Bundle savedInstanceState)  {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.names_layout);
          backBtn=(Button)findViewById(R.id.backBtn);
          backBtn.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  finish();
              }
          });
          names_layout=(RelativeLayout) findViewById(R.id.db2_root);
          TextView text=new TextView(this);
          Intent recv=getIntent();
          ArrayList&lt;String&gt; str= recv.getStringArrayListExtra("E");
          text.setText(str.get());
          text.setLayoutParams(new ActionBar.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT));
          names_layout.addView(text);
          System.out.println(str);
  }
  }
  </code></pre>