如何解决GetUserCallback?

时间:2016-07-14 19:16:30

标签: java android

import android.app.ProgressDialog;
import android.content.Context;

/**
 * Created by Software Engineer on 7/14/2016.
 */
public class ServerRequests {
    ProgressDialog progressDialog;
    public static final int CONNECTION_TIMEOUT = 1000 * 15;
    public static final String SERVER_ADDRESS = "http://manibala.comlu.com/";

    public ServerRequests(Context context) {
        // Instantiate Progress Dialogue
        progressDialog = new ProgressDialog(context);
        // Set the attribute of Progress Dialogue
        progressDialog.setCancelable(false);
        progressDialog.setTitle("Processing");
        progressDialog.setMessage("Please wait...");
    }

    public void storeUserDataInBackground(User user, GetUserCallBack callBack) {
        progressDialog.show();
    }
}

1 个答案:

答案 0 :(得分:0)

在Java包中创建接口。例如:make文件名为GetUserCallback.java

interface GetUserCallback {
    public abstract void done(User returnedUser);
}

它完成了!