Converting EditText / TextView to String?
Our Sample Code

    EditText txtData = (EditText) findViewById(R.id.txtData);
	Button btnReadSDFile = (Button) findViewById(R.id.btnReadSDFile);
	btnReadSDFile.setOnClickListener(new OnClickListener() 
	{
		public void onClick(View v) 
		{
			// write on SD card file data in the text box
			try 
			{
				//Read a file from SDCard to TextBox(EditText)
				File myFile = new File("/mnt/sdcard/config_data.med");
				FileInputStream fIn = new FileInputStream(myFile);
				BufferedReader myReader = new BufferedReader(new InputStreamReader(fIn));
				String aDataRow = "";
				String aBuffer = "";
				while ((aDataRow = myReader.readLine()) != null)
				{
					aBuffer += aDataRow + "\n";
				}
				txtData.setText(aBuffer);
				myReader.close();
				String s = txtData.getText().toString();
				Log.e("txtData",s);
			} 
			catch (Exception e) 
			{
				Toast.makeText(getBaseContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
			}
		}
	});

Our Original File Content

    Welcome
    To
    All

Our Log Result ScreenShot

![enter image description here][1]

Why our content is collapsing here. How to solve it.

Thanks in advance.
  [1]: http://i.stack.imgur.com/yeYFk.png
Converting EditText / TextView to String?
===

Our Sample Code

    EditText txtData = (EditText) findViewById(R.id.txtData);
	Button btnReadSDFile = (Button) findViewById(R.id.btnReadSDFile);
	btnReadSDFile.setOnClickListener(new OnClickListener() 
	{
		public void onClick(View v) 
		{
			// write on SD card file data in the text box
			try 
			{
				//Read a file from SDCard to TextBox(EditText)
				File myFile = new File("/mnt/sdcard/config_data.med");
				FileInputStream fIn = new FileInputStream(myFile);
				BufferedReader myReader = new BufferedReader(new InputStreamReader(fIn));
				String aDataRow = "";
				String aBuffer = "";
				while ((aDataRow = myReader.readLine()) != null)
				{
					aBuffer += aDataRow + "\n";
				}
				txtData.setText(aBuffer);
				myReader.close();
				String s = txtData.getText().toString();
				Log.e("txtData",s);
			} 
			catch (Exception e) 
			{
				Toast.makeText(getBaseContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
			}
		}
	});

Our Original File Content

    Welcome
    To
    All

Our Log Result ScreenShot

![enter image description here][1]

Why our content is collapsing here. How to solve it.

Thanks in advance.
  [1]: http://i.stack.imgur.com/yeYFk.png