how to create more than one files in SD card?
<p>i tried the code below!!every time it replaces contents from file "textfile.txt" i want the user to add files to SD card with name which they have entered as "filename" 
i have registered onclick listener on save button
Code:       </p>

<pre><code>            EditText filename =(EditText) findViewById(R.id.filename);

             EditText filecontent =(EditText) findViewById(R.id.filecontent);

                public void onClick(View view) 

                      { 

                       String str = filename.getText().toString();
          String str2= filecontent.getText().toString();


                    file sdCard = Environment.getExternalStorageDirectory();
            File directory = new File (sdCard.getAbsolutePath() +"/MyFiles");
            directory.mkdirs();



                    File file = new File(directory,"textfile.txt");
                    file.createNewFile();


                    FileOutputStream fOut = new FileOutputStream(file);
            OutputStreamWriter osw = new OutputStreamWriter(fOut);


                    osw.write(str);
            osw.write("   ");
            osw.write(str2);
           osw.flush();
            osw.close();
                    }
</code></pre>
