Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You need to close the cursor at the end of process.</p> <pre><code>public class scoreboard_fruit extends Activity{ //SQLite Method private SQLiteAdapter mySQLiteAdapter; SimpleCursorAdapter cursorAdapter; Cursor cursor; @SuppressWarnings("deprecation") protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.scoreboard_fruit); ListView level = (ListView)findViewById(R.id.level); ListView correct = (ListView)findViewById(R.id.correct); ListView incorrect = (ListView)findViewById(R.id.incorrect); ListView date = (ListView)findViewById(R.id.date); ListView percentage = (ListView)findViewById(R.id.percentage); ListView result = (ListView)findViewById(R.id.result); mySQLiteAdapter = new SQLiteAdapter(this); mySQLiteAdapter.openToRead(); cursor = mySQLiteAdapter.queue_FRUIT(); startManagingCursor(cursor); String[] from2 = new String[]{SQLiteAdapter.KEY_LEVEL}; int[] to2 = new int[]{R.id.text}; String[] from3 = new String[]{SQLiteAdapter.KEY_CORRECT}; int[] to3 = new int[]{R.id.text}; String[] from4 = new String[]{SQLiteAdapter.KEY_INCORRECT}; int[] to4 = new int[]{R.id.text}; String[] from5 = new String[]{SQLiteAdapter.KEY_DATE}; int[] to5 = new int[]{R.id.text}; String[] from6 = new String[]{SQLiteAdapter.KEY_PERCENTAGE}; int[] to6 = new int[]{R.id.text}; String[] from7 = new String[]{SQLiteAdapter.KEY_RESULT}; int[] to7 = new int[]{R.id.text}; SimpleCursorAdapter cursorAdapter2 = new SimpleCursorAdapter(this, R.layout.row, cursor, from2, to2); SimpleCursorAdapter cursorAdapter3 = new SimpleCursorAdapter(this, R.layout.row, cursor, from3, to3); SimpleCursorAdapter cursorAdapter4 = new SimpleCursorAdapter(this, R.layout.row, cursor, from4, to4); SimpleCursorAdapter cursorAdapter5 = new SimpleCursorAdapter(this, R.layout.row, cursor, from5, to5); SimpleCursorAdapter cursorAdapter6 = new SimpleCursorAdapter(this, R.layout.row, cursor, from6, to6); SimpleCursorAdapter cursorAdapter7 = new SimpleCursorAdapter(this, R.layout.row, cursor, from7, to7); level.setAdapter(cursorAdapter2); correct.setAdapter(cursorAdapter3); incorrect.setAdapter(cursorAdapter4); date.setAdapter(cursorAdapter5); percentage.setAdapter(cursorAdapter6); result.setAdapter(cursorAdapter7); cursorAdapter2.close(); cursorAdapter3.close(); cursorAdapter4.close(); cursorAdapter5.close(); cursorAdapter6.close(); cursorAdapter7.close(); mySQLiteAdapter.close(); } } </code></pre> <p>Hope this helps !!!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload