Sharing an arraylist by Email in apps
<p>I am very new in android; I am working on an application, where I need to send a mail of list (array list) items by using Share option. Currently, I am able to send the list in array format like [htc, motorla, samsung] by using the below code:</p>

<pre><code>private void shareIt(){
    //String[] mailBody = (String[])cl.toString()
    int array_size = cl.getCount();
    String[] mailBody = new String[array_size];
    for (int i =0;i&lt;array_size;i++){
        mailBody[i] = cl.getItem(i).toString();
    }

    Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
    sharingIntent.setType("text/plain");
    sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, Arrays.toString(mailBody));
    startActivity(Intent.createChooser(sharingIntent, "Share via"));
}
</code></pre>

<p>But I want to create a mail body in table format like:
htc
motorla
samsung</p>

<p>Please help me out to format the array in table format; which will be applicable for <code>sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, Arrays.toString(mailBody));
</code>
Thanks.</p>
