title: setText() into a textview from a database
body: <p>I am new to Android App Development. I am try to view my database using a Textview in my activity.</p>
  
  <p>Here is my setText() java</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_viewlogs); 
  TextView tv = (TextView) findViewById(R.id.tvSqlinfo);
  LogsDB info = new LogsDB(this);
  info.open();
  ArrayList&lt;String&gt; data = info.getData();
  info.close();
  tv.setText(data);
  }
  </code></pre>
  
  <p>I seem to be getting and error at tv.setText(data);. Stating "The method setText(CharSequence) in the type TextView is not applicable for the arguments (ArrayList)" Then when i do the recommended fix it changes  </p>
  
  <pre><code>tv.setText(data)
  </code></pre>
  
  <p>to </p>
  
  <pre><code>tv.setText((CharSequence) data);
  </code></pre>
  
  <p>Then when I test the application I get an error stating that it cannot be cast.
  What do I need to change to be able to view my database in the textview?</p>
  
  <p>Any advice and help would be greatly appreciated.
  Thanks</p>