title: Firebase query result in ListView UI and RecyclerView UI
body: <p>I am trying to create a Firebase database to store employee information and then when an address is queried, all the employees staying in that particular area should be displayed in a ListView or a RecyclerView however, I am having the following problem:</p>
  
  <p>I am unable to populate the ListView.</p>
  
  <pre><code>    ArrayList&lt;String&gt; mItems = new ArrayList&lt;&gt;();
      ArrayAdapter mAdapter;
      ListView mRecyclerView;
  
      FirebaseListAdapter&lt;String&gt; fireAdapter = new FirebaseListAdapter&lt;String&gt;() {
              @Override
              protected void populateView(View view, String s) {
               //populate view
              }
          };
  </code></pre>
  
  <p>In the above code, I am unable to write the constructor so that it becomes,</p>
  
  <pre><code>    FirebaseListAdapter&lt;String&gt; fireAdapter = new FirebaseListAdapter&lt;String&gt;(this,String.class,
                  android.R.layout.simple_list_item_1,mEmployRef) {
              @Override
              protected void populateView(View view, String s) {
                  //populate view
              }
          }; 
  </code></pre>
  
  <p>When I write the above code with the constructor, it says,</p>
  
  <p>Cannot resolve constructor 'FirebaseListAdapter(anonymous             android.view.View.OnClickListener, java.lang.Class, int, com.google.firebase.database.DatabaseReference)'</p>
  
  <p>How do I resolve this? A similar problem occurs when I try to use a RecyclerView.</p>