title: Arraylist cannot be applied
body: <p>I am trying to get the password description text input to populate the array view of my app.</p>
  
  <p><a href="https://i.stack.imgur.com/qLpdp.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qLpdp.jpg" alt="enter image description here"></a></p>
  
  <p>Unfortunately, for portion of my while(cursor.movetoNext()) say that my string cannot be applied to arraylist. I am trying to determine what to change in my updateList method to accommodate my password item.</p>
  
  <p>Here is my updatelist method.</p>
  
  <pre><code>   private void updateList(){
             ArrayList&lt;String&gt; tasklist = new ArrayList&lt;&gt;();
             SQLiteDatabase db = mHelper.getReadableDatabase();
             Cursor cursor = db.query( PasswordContract.PasswordEntry.TABLE, new String[]{PasswordContract.PasswordEntry._ID, PasswordContract.PasswordEntry.COL_PASSWORD, PasswordContract.PasswordEntry.COL_PASS_DESC},
                     null, null, null, null, null);
  
             while (cursor.moveToNext()){
                 String password = cursor.getString(cursor.getColumnIndex(PasswordContract.PasswordEntry.COL_PASSWORD));
                 String description = cursor.getString(cursor.getColumnIndex(PasswordContract.PasswordEntry.COL_PASS_DESC));
                 tasklist.add(new PasswordItem(password, description));
  
  if (mAdapter == null){
             mAdapter = new ArrayAdapter&lt;&gt;(this,
                     R.layout.item_password,
                     R.id.password,
                     R.id.password_description,
                     tasklist);
             mPasswordListView.setAdapter(mAdapter);
  }else{
             mAdapter.clear();
             mAdapter.addAll(String.valueOf(tasklist));
             mAdapter.notifyDataSetChanged();
         }
         cursor.close();
         db.close();
  </code></pre>
  
  <p>I am trying to figure out how to connect my customadapter to my updatelist method.</p>
  
  <pre><code>public class CustomAdapter extends ArrayAdapter&lt;String&gt;{
  
      private Context mContext;
      private List&lt;String&gt; mStringList;
      public CustomAdapter(Context context, List&lt;String&gt; mStringList) {
          super(context, R.layout.item_password);
          this.mContext = context;
          this.mStringList = new ArrayList&lt;&gt;();
          this.mStringList = mStringList;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent){
          LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          convertView = inflater.inflate(R.layout.item_password, parent, false);
  
          TextView your_first_text_view = (TextView) convertView.findViewById(R.id.password);
          TextView your_second_text_view = (TextView) convertView.findViewById(R.id.password_description);
  
          your_first_text_view.setText(mStringList.get(position));
          your_second_text_view.setText(mStringList.get(position));
          return convertView;
      }
  </code></pre>