-1
我已經使用解析數據庫創建了一個演示應用程序。在這個應用程序,我成功取回由解析輸入電話的靜態值的特定行數據到Android類似的代碼爲:如何檢索行數據通過在parse.com中使用移動號碼?
public void onClick(View arg0){
ParseQuery<ParseObject> query = ParseQuery.getQuery("_User");
query.whereEqualTo("phone", "456767");
query.findInBackground(new FindCallback<ParseObject>() {
\t public void done(List<ParseObject> objects, ParseException e) {
\t \t if (e == null) {
\t \t \t String username = objects.get(0).getString(
\t \t \t \t \t "username");
\t \t \t String passcode = objects.get(0).getString(
\t \t \t \t \t "passcode");
\t \t \t String latitude = objects.get(0).getString(
\t \t \t \t \t "latitude");
\t \t \t String longitude = objects.get(0).getString(
\t \t \t \t \t "longitude");
\t \t \t // Locate the TextView
\t \t \t txtusername = (TextView) findViewById(R.id.username);
\t \t \t txtpasscode = (TextView) findViewById(R.id.passcode);
\t \t \t txtlatitude = (TextView) findViewById(R.id.latitude);
\t \t \t txtlongitude = (TextView) findViewById(R.id.longitude);
\t \t \t txtusername.setText(username);
\t \t \t txtpasscode.setText(passcode);
\t \t \t txtlatitude.setText(latitude);
\t \t \t txtlongitude.setText(longitude);
\t \t \t Log.d("phone", "Retrieved " + objects.size()+ " phone");
現在我有點困惑,即如何當我在應用程序UI中的編輯文本字段中輸入電話號碼(存儲在解析數據庫中)時檢索相同的數據。
請解釋任何幫助,從你身邊表示讚賞。 database.but
所以你想要得到來自EditTex的數字噸,然後用這個數字來查詢? –