how to write the code read one by one TextView , how to store the sd card
<p>This is my code: how to write the java code display the one by one textview ,for example click the submit button display the text view and store And next time click the same button display the next text view and store the data.how write this type of java code,I have a main .xml file </p>

<pre><code>public class XMLRWActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button submit_btn =  (Button) findViewById (R.id.submit_btn);
final EditText textbox = (EditText) findViewById (R.id.first_text);
final TextView newtext = (TextView) findViewById (R.id.read_text);

submit_btn.setOnClickListener(new View.OnClickListener() {
    public void onClick(View v) {
            byte[] readinfo = new byte[160];
            String FILENAME = "first_file";
        FileOutputStream mystream;
    try {
        mystream = openFileOutput (FILENAME, Context.MODE_PRIVATE);
        String variabletowrite = textbox.getText().toString();

        mystream.write(variabletowrite.getBytes());
        mystream.close();
        FileInputStream readstream = openFileInput (FILENAME);
        readstream.read(readinfo);
        newtext.setText(new String(readinfo));


        readstream.close();
    } catch (FileNotFoundException e) {
    e.printStackTrace();
    } catch (IOException e) {
    e.printStackTrace();
    }
    }
   });
   }
 }
</code></pre>

<p>This is a main.xml file</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weightSum="1"&gt;
&lt;TextView  
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:text="@string/hello"
/&gt;
&lt;EditText android:id="@+id/first_text"
 android:layout_width="match_parent"
android:layout_height="wrap_content"&gt;
&lt;requestFocus&gt;&lt;/requestFocus&gt;
&lt;/EditText&gt;
&lt;Button android:layout_height="wrap_content" 
android:text="Submit"     
android:id="@+id/submit_btn" 
 android:layout_width="match_parent" /&gt;

&lt;TextView
android:id="@+id/read_text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView1"
android:textAppearance="?android:attr/textAppearanceLarge" &gt;&lt;/TextView&gt;
&lt;TextView
android:id="@+id/read_text2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView2"
android:textAppearance="?android:attr/textAppearanceLarge" &gt;&lt;/TextView&gt;
&lt;TextView
android:id="@+id/read_text3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView3"
android:textAppearance="?android:attr/textAppearanceLarge" &gt;

 &lt;/TextView&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>This is a storage permission in manifest file</p>

<pre><code>&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" &gt; &lt;/uses-permission&gt;
</code></pre>
