2017-07-15 112 views

回答

0

你可以试试这个

Cursor myCursor = db.rawQuery("SELECT * FROM measurements WHERE _id = 1", null); 
String myEditTextValue = myCursor.getString(*ColumnIndexHere*); 

EditText myEditText= (EditText) findViewById(R.id.*EditTextIdHere*); 
myEditText.setText(myEditTextValue); 

但是请注意,在Android上最好的做法是使用内容提供商。欲知更多详情,请点击这里 https://www.youtube.com/watch?v=CKjFfcFelrI and this https://developer.android.com/guide/topics/providers/content-providers.html

相关问题