private Cursor getEvents() { // TODO Auto-generated method stub events = new EventsData(this); events.getWritableDatabase(); SQLiteDatabase db = events.getWritableDatabase(); Cursor cursor = db.rawQuery("SELECT unameTEXT FROM " + TABLE, null); startManagingCursor(cursor); return cursor; }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_view); bt = (Button) findViewById(R.id.back); bt.setOnClickListener(this); text = (TextView) findViewById(R.id.output); EventsData events = new EventsData(this); events.getWritableDatabase(); Cursor cursor = getEvents(); showEvents(cursor); }