title: RecyclerView doesn't add EditText until second time it's clicked? (notifyDataSetChanged?)
body: <p><strong>Goal: Use RecyclerView to add EditText fields to Activity</strong></p>
  
  <p>What's happening: I would like for LinearLayouts(horizontal) with ImageView and EditText to be added to the screen whenever the "Add" button is clicked. They are not showing up until I:</p>
  
  <p>-1)Type in the edittext field and click done</p>
  
  <p>-2) Click add</p>
  
  <p>-3) Click on the EditText field I already typed in and then click done again, or click off of it</p>
  
  <p>It SHOULD add after Step 2, not Step 3. My thought is it has something to do with the notifyDataSetChanged but I'm not sure what?</p>
  
  <p>Research done: Spent the last few days going through documentation, tutorials, youtube videos, and stackoverflow searches</p>
  
  <p>Testing done: Tried moving placement of my method that calls notifyDataSetChanged();
  Tried changing the dimensions of the layout
  Tried changing the inputType</p>
  
  <p>MyAdapter.java:</p>
  
  <pre><code>import android.content.Context;
  import android.support.v7.widget.RecyclerView;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.EditText;
  import android.widget.LinearLayout;
  
  import java.util.ArrayList;
  import java.util.List;
  import java.util.Random;
  
  class MyAdapter extends RecyclerView.Adapter&lt;MyAdapter.ViewHolder&gt;{
      private ArrayList&lt;LinearLayout&gt; mDataSet;
      private Context mContext;
      private Random mRandom = new Random();
  
  
      public MyAdapter(Context context){
  
          mContext = context;
      }
  
      public static class ViewHolder extends RecyclerView.ViewHolder{
          public EditText mTextEditName, mTextEditLocation;
          public LinearLayout mRelativeLayout; //from the (Main)Activity XML
          public ViewHolder(View v){
              super(v);
              mTextEditName = (EditText) v.findViewById(R.id.nameOfBusinessET);
  
              mRelativeLayout = (LinearLayout) v.findViewById(R.id.rl);
          }
      }
  
      void updateDataSet(ArrayList&lt;LinearLayout&gt; myArrayList) {
          mDataSet = myArrayList;
          notifyDataSetChanged();
      }
  
      @Override
      public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType){
          // Create a new View
          View v = LayoutInflater.from(mContext).inflate(R.layout.row_layout,parent,false);
          ViewHolder vh = new ViewHolder(v);
          return vh;
      }
  
      @Override
      public void onBindViewHolder(ViewHolder holder, int position) {
  
          holder.mTextEditName.setText("");
  
      }       
  
      @Override
      public int getItemCount(){
          return mDataSet.size();
      }
  
  }
  </code></pre>
  
  <p>RegisterBusinessActivity.java:</p>
  
  <pre><code>public class RegisterBusinessActivity extends Activity {
  
      EditText businessLocationET;
  
      //FIREBASE ITEMS
      private static FirebaseUser currentUser;
      private static final String TAG = "RealtimeDB";
      private FirebaseDatabase database;
      private DatabaseReference dbRef;
      private EditText businessName;
  
      //RECYCLERVIEW ITEMS
      private Context mContext;
      LinearLayout mLinearLayout;
      private RecyclerView mRecyclerView;
      private MyAdapter mAdapter;
      private RecyclerView.LayoutManager mLayoutManager;
      int position;
      ArrayList&lt;LinearLayout&gt; linearLayoutList = new ArrayList&lt;LinearLayout&gt;();
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_register_businessprofile);
  
          Button addLocationBtn = (Button) findViewById(R.id.addLocationBtn);
          businessLocationET = (EditText) findViewById(R.id.businessLocationET);
  
  
          // Get the widgets reference from XML layout
          mLinearLayout = (LinearLayout) findViewById(R.id.rl);
          mRecyclerView = (RecyclerView) findViewById(R.id.recycler_view);
  
          mContext = getApplicationContext(); // Get the application context
          linearLayoutList.add(mLinearLayout);
  
          // Define a layout for RecyclerView
          mLayoutManager = new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false);
          mRecyclerView.setLayoutManager(mLayoutManager);
          // Initialize a new instance of RecyclerView Adapter instance
          mAdapter = new MyAdapter(mContext);
  
          // Set the adapter for RecyclerView
          mRecyclerView.setAdapter(mAdapter);
          mAdapter.updateDataSet(linearLayoutList);
  
  
          //FIREBASE FIELDS
          businessName = (EditText) findViewById(R.id.nameOfBusinessET);
          database = FirebaseDatabase.getInstance();
          dbRef = database.getReference("/data");
          currentUser =
                  FirebaseAuth.getInstance().getCurrentUser();            
  
  
  
          //ADD EXTRA LOCATIONS
          addLocationBtn.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
  
                  linearLayoutList.add(mLinearLayout);
              }
          });
  
  
      DatabaseReference.CompletionListener completionListener =
              new DatabaseReference.CompletionListener() {
                  @Override
                  public void onComplete(DatabaseError databaseError,
                                         DatabaseReference databaseReference) {
  
                      if (databaseError != null) {
                          notifyUser(databaseError.getMessage());
                      }
                  }
              };
  
  
      private void notifyUser(String message) {
          Toast.makeText(RegisterBusinessActivity.this, message,
                  Toast.LENGTH_SHORT).show();
      }
  
  
  }
  </code></pre>