Back to project page test-gradle.
The source code is released under:
Copyright (c) <2013> <Paul Estrada> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the S...
If you think the Android project test-gradle listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.listexample.sql; //from w ww . j av a 2s .c o m import java.util.List; import android.app.Activity; import android.os.Bundle; import android.util.Log; import com.example.listexample.R; public class SqliteActivity extends Activity { private static final String TAG = "SqliteActicity"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sqlite); MyDatabaseHelper dbHelper = new MyDatabaseHelper(this); dbHelper.insertUser("John", "123456"); dbHelper.insertUser("Sarah", "480455"); dbHelper.insertUser("Michael", "568888"); dbHelper.insertUser("Michelle", "564484"); List<User> users = dbHelper.selectUsers(DBConstants.COLUMN_USER_NAME + "='John'"); for (User user : users) { Log.e(TAG, "user id: " + user.getId()); Log.e(TAG, "user id: " + user.getName()); Log.e(TAG, "user id: " + user.getPhone()); Log.e(TAG, "----------------"); } } }