Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onCreate(SQLiteDatabase db) {
- String queryR = "SELECT intR FROM colors";
- String queryG = "SELECT intG FROM colors";
- String queryB = "SELECT intB FROM colors";
- int[] R = null;
- int[] G = null;
- int[] B = null;
- try {
- Cursor cursor = db.rawQuery(queryR,null);
- if (cursor != null) {
- for( int i = 0;i < cursor.getCount(); i++) {
- R[i] = cursor.getInt(cursor.getColumnIndex("intR"));
- }
- for( int i = 0; i < cursor.getCount(); i++) {
- G[i] = cursor.getInt(cursor.getColumnIndex("intG"));
- }
- for( int i = 0; i < cursor.getCount(); i++) {
- B[i] = cursor.getInt(cursor.getColumnIndex("intB"));
- }
- }
- } catch (NumberFormatException e) { throw new Error("777"); }
- }
Add Comment
Please, Sign In to add comment