title: Android Record Count Toast Message?
body: <p>I have an App I would like to cripple by allowing only 5 records to be shown when doing a query.... The following is the code I'm using within the DataBaseHelper.java for this and it works great for what I need........It returns only 5 records in DESC order by KEY_RECORD1</p>
  <p>My question is I would like implement a Warning message in the form of a Toast when this 5 Record limit it reached.....</p>
  <p>So when you Add the Sixth Record you would get....Example Toast: Limit of 5 Records has been reached!</p>
  <pre><code>public Cursor fetchAllNotes() {
      return mDb.query(DATABASE_TABLE,
              new String[] { KEY_ROWID, KEY_RECORD1, KEY_RECORD2,
                      KEY_RECORD3}, null,
              null, null, null, KEY_RECORD1 + &quot; DESC&quot;, &quot;5&quot;);
  }
  </code></pre>