title: Adapter not populating RecyclerView
body: <p>Hey I have a current application that takes password information from user and stores it into a SQLiteDatabase. My problem is that I cannot get my RecyclerView to populate with this data. I can see that there are entries in the Database.</p>
  
  <p>Code for my Adapter. </p>
  
  <pre><code>public class DataAdapter extends RecyclerView.Adapter&lt;DataAdapter.DataHolder&gt; {
      protected ArrayList&lt;PasswordResults&gt; passwords;
  
      class DataHolder extends RecyclerView.ViewHolder {
          public TextView id_tv;
          public TextView name_tv;
          public TextView website_tv;
          public TextView desc_tv;
          // public Button view_btn; (IGNORE)
          public TextView username_tv;
          public TextView password_tv;
  
          DataHolder(View v) {
              super(v);
              id_tv = (TextView) v.findViewById(R.id.tv_id);
              name_tv = (TextView) v.findViewById(R.id.tv_name);
              website_tv = (TextView) v.findViewById(R.id.tv_website);
              desc_tv = (TextView) v.findViewById(R.id.tv_desc);
  
              username_tv = (TextView) v.findViewById(R.id.tv_username);
              password_tv = (TextView) v.findViewById(R.id.tv_password);
          }
      }
  
          DataAdapter(ArrayList&lt;PasswordResults&gt; inData){
              passwords = inData;
          }
  
          @Override
          public DataAdapter.DataHolder onCreateViewHolder(ViewGroup parent, int type){
              View v = (View) LayoutInflater.from(parent.getContext()).inflate(R.layout.password_rows, parent, false);
              DataHolder passwordHolder = new DataHolder(v);
              return passwordHolder;
          }
  
          @Override
          public void onBindViewHolder(DataHolder holder, int position){
              PasswordResults passwordResults = passwords.get(position);
  
              // set values to text views.
              holder.id_tv.setText(String.valueOf(position+1));
              String name = passwordResults.entryName;
              holder.name_tv.setText(name);
              String website = passwordResults.website;
              holder.website_tv.setText(website);
              String desc = passwordResults.description;
              holder.desc_tv.setText(desc);
              String username = passwordResults.username;
              holder.username_tv.setText(username);
              String password = passwordResults.password;
              holder.password_tv.setText(password);
  
          }
  
          @Override
          public int getItemCount(){
              return passwords.size();
          }
  }
  </code></pre>
  
  <p>Here is my code for my database class</p>
  
  <pre><code>public class Database extends SQLiteOpenHelper {
  
      // version, database name, and table name.
      private static final int DATABASE_VERSION = 2;
      private static final String DATABASE_NAME = "DB_Passwords";
      protected static final String TABLE_NAME = "passwords";
  
      public ArrayList&lt;PasswordResults&gt; passwords;
  
      // creating names for columns.
      public final static String COLUMN_ID = "_id";
      public final static String COLUMN_NAME = "entryName";
      public final static String COLUMN_WEBSITE = "website";
      public final static String COLUMN_USERNAME = "username";
      public final static String COLUMN_PASSWORD = "password";
      public final static String COLUMN_DESC = "description";
  
      // creating table string.
      public static final String CREATE_TABLE = "create table if not exists "+TABLE_NAME+" ("
              + COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "
              + COLUMN_NAME +" VARCHAR(100), "
              + COLUMN_WEBSITE +" VARCHAR(100), "
              + COLUMN_USERNAME +" VARCHAR(100), "
              + COLUMN_PASSWORD +" VARCHAR(100), "
              + COLUMN_DESC +" TEXT)";
  
      // db helper
      public Database(Context c){
          super(c, DATABASE_NAME, null, DATABASE_VERSION);
      }
  
      // create table when the app is loaded.
      @Override
      public void onCreate(SQLiteDatabase db){
          db.execSQL(CREATE_TABLE);
      }
  
      // handle upgrades
      @Override
      public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
          // drop and create new.
          db.execSQL("DROP TABLE "+TABLE_NAME);
          onCreate(db);
      }
  
      public void addPassword(String n, String w, String u, String p, String d) {
          // get database.
          SQLiteDatabase db = getWritableDatabase();
  
          try {
              // add scores.
              ContentValues values = new ContentValues();
              values.put(COLUMN_NAME, n);
              values.put(COLUMN_WEBSITE, w);
              values.put(COLUMN_USERNAME, u);
              values.put(COLUMN_PASSWORD, p);
              values.put(COLUMN_DESC, d);
  
              // insert will handle null values. closing.
              db.insert(TABLE_NAME, "", values);
              db.close();
          } catch (Exception e) {
              e.getLocalizedMessage();
          }
      }
  
      public void removePassword(String id){
          // get database.
          SQLiteDatabase db = getWritableDatabase();
  
          // delete database then close or print error.
          try {
              db.delete(TABLE_NAME, "id="+id, null);
              db.close();
          } catch(Exception e) {
              e.getLocalizedMessage();
          }
      }
  
      public void updatePassword(String id, String n, String w, String u, String p, String d) {
          // get database.
          SQLiteDatabase db = getWritableDatabase();
  
          //update database then close or print error.
          try {
              ContentValues values = new ContentValues();
              values.put(COLUMN_ID, id);
              values.put(COLUMN_NAME, n);
              values.put(COLUMN_WEBSITE, w);
              values.put(COLUMN_USERNAME, u);
              values.put(COLUMN_PASSWORD, p);
              values.put(COLUMN_DESC, d);
              db.update(TABLE_NAME, values, "_id="+id, null);
              db.close();
          } catch (Exception e) {
              e.getLocalizedMessage();
          }
      }
  
      public ArrayList&lt;PasswordResults&gt; getPasswords() {
          // get database, password array, and select statement.
          passwords = new ArrayList&lt;&gt;();
          String refQuery = "Select "+COLUMN_NAME+", "+COLUMN_WEBSITE+", "+COLUMN_USERNAME+", "+COLUMN_PASSWORD+", "+COLUMN_DESC+" FROM "+TABLE_NAME;
          SQLiteDatabase db = getWritableDatabase();
  
          // link to database
          Cursor cursor = db.rawQuery(refQuery, null);
          if(cursor.moveToFirst()) {
              do {
                  PasswordResults passwordResults = new PasswordResults();
                  passwordResults.entryName = cursor.getString(0);
                  passwordResults.website = cursor.getString(1);
                  passwordResults.username = cursor.getString(2);
                  passwordResults.password = cursor.getString(3);
                  passwordResults.description = cursor.getString(4);
              } while(cursor.moveToNext());
          }
          db.close();
          return passwords;
      }
  
      public ArrayList&lt;PasswordResults&gt; getSelectedPassword(String id) {
          // get database, password array, and select statement.
          passwords = new ArrayList&lt;&gt;();
          String refQuery = "Select * from "+TABLE_NAME+" WHERE "+COLUMN_ID+" = "+id;
          SQLiteDatabase db = getWritableDatabase();
  
          // link to database
          Cursor cursor = db.rawQuery(refQuery, null);
          if(cursor.moveToFirst()) {
              do {
                  PasswordResults passwordResults = new PasswordResults();
                  passwordResults.id = cursor.getInt(0);
                  passwordResults.entryName = cursor.getString(1);
                  passwordResults.website = cursor.getString(2);
                  passwordResults.username = cursor.getString(3);
                  passwordResults.password = cursor.getString(4);
                  passwordResults.description = cursor.getString(5);
              } while(cursor.moveToNext());
          }
          db.close();
          return passwords;
      }
  
  }
  </code></pre>
  
  <p>Here is my class that holds the results</p>
  
  <pre><code>public class PasswordResults {
      public int id;
      public String entryName;
      public String website;
      public String username;
      public String password;
      public String description;
  }
  </code></pre>