title: How to put data into ListView of XML?
body: <p>I just started learning Android and I am trying to create a simple view where a portion of the main XML is a listview.</p>
  
  <p>Here is my main.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
  
      &lt;RelativeLayout
          android:layout_width="100dp"
          android:layout_height="match_parent"
          android:layout_alignParentLeft="true"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true"
          android:id="@+id/Menu"&gt;
  
          &lt;ImageButton
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/menu_item_1"
              android:layout_alignParentTop="true"
              android:layout_centerHorizontal="true"
              android:layout_marginTop="129dp" /&gt;
  
      &lt;/RelativeLayout&gt;
  
      &lt;FrameLayout
          android:layout_width="match_parent"
          android:layout_height="60dp"
          android:layout_toEndOf="@+id/Menu"
          android:layout_toRightOf="@+id/Menu"
          android:layout_alignParentTop="true"
          android:id="@+id/Banner"&gt;
  
          &lt;TextView
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:text="Account Log"
              android:layout_gravity="center"
              android:inputType="none"
              android:textStyle="bold"/&gt;
      &lt;/FrameLayout&gt;
  
      &lt;ListView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/Log"
          android:layout_toRightOf="@+id/Menu"
          android:layout_below="@+id/Banner"
          android:layout_alignParentRight="true"
          android:layout_alignParentEnd="true"
          android:choiceMode="none"
          android:clickable="false"
          android:contextClickable="true"
          android:fadeScrollbars="true" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Assuming that I have a function called <code>getDatafromFile()</code> which returns an ArrayList of data, how do I put those data into my listView?</p>
  
  <p>I've heard of using ArrayAdapter but the examples I've seen puts ListView to the entire layout.</p>