title: Android recyclerview and sqlite issue
body: <p>I have existing db file and i want when user type word search in db after load it recyclerview. But when scroll up or down some times laggy. So i want to redesign it but i cant do this. When i use AsynTask in onBind to load in background sometimes my rows show empty... </p>
  
  <p>DB file have three columns > <strong>ID(Integer), Data(Text), Category(Text)</strong></p>
  
  <p>Adapter;</p>
  
  <pre><code>public class AdapterSearch extends Adapter&lt;MID, AdapterSearch.Holder&gt; {
  
      public  AdapterSearch(Context context, List&lt;MID&gt; list) {
          super(context, list);
      }
  
      public void onBind(final Holder holder, final int pos) {
          final MData   mData     = Database.get(list.get(pos).id());
          if(mData.isValid()) {
              String textData     = mData.getData();
              String textCategory = mData.getCategory();
  
              holder.txData.setText(textData);
              holder.txCategory.setText(textCategory);
          }
      }
  
      public Holder createHolder(ViewGroup parent, int viewType) {
          return new Holder(inflater.inflate(R.layout.search_row, parent, false));
      }
  
      protected class Holder extends RecyclerView.ViewHolder {
          @Nullable @Bind(R.id.data)
          AppCompatTextView txData;
          @Nullable @Bind(R.id.category)
          AppCompatTextView txCategory;
  
          public Holder(View view) {
              super(view);
              ButterKnife.bind(this, view);
          }
      }
  
  }
  </code></pre>
  
  <p>MData;</p>
  
  <pre><code>public class MData {
  
      private String
              data,
              category;
  
      public MData(@Nullable String data, @NonNull String category) {
          this.data         = data;
          this.category          = category;
      }
  
      public String getCategory() {
          return category;
      }
  
  
      public String getData() {
          return data;
      }
  
  }
  </code></pre>
  
  <p>MID;</p>
  
  <pre><code>public class MID {
  
      private final int
              id;
  
      public MID(int id) {
          this.id = id;
      }
  
      public int id() {return this.id;}
  
  }
  </code></pre>
  
  <p>Database;</p>
  
  <pre><code>public class Database extends SQLiteOpenHelper{
  
      ......
  
      public static MData get(int mID){
          MData mData = null;
          String   data;
          final Cursor cursor = db.query.....;
          if(cursor != null &amp;&amp; cursor.moveToFirst()) {
              mData = new MData(cursor.getString(1), cursor.getString(2));
              cursor.close();
          }
  
          return mData;
      }
  
      ......
      ..
  
  }
  </code></pre>
  
  <p>When search button click;</p>
  
  <pre><code>List&lt;MID&gt; searchList = null;
  final Cursor cursorMID = db.query......;
  if (cursorMID != null &amp;&amp; cursorMID.moveToFirst()) {
      searchList = new ArrayList&lt;&gt;();
      do {
          searchList.add(new MID(cursorMID.getInt(0)));
      } while (cursorMID.moveToNext());
      cursorMID.close();
  }
  
  rcylerView.setAdapter(getContext(), searchList);
  </code></pre>