我设法使用Callable将我的程序传递给另一个类,然后该类在完成后调用它。该类创建一个字符串的HashMap,我希望能够将其传递给可调用的过程,但我无法弄明白:S
passes the procedure to the class
stockDisplaying = new SQLStatements().LoadAllDrinks(this, new Callable<Integer>() {
public Integer call() {
return callWhenDone(null);
}
});
the procedure I'm passing I want to be able to send to HashMap to
public int callWhenDone(HashMap<String, String> map){
Log.d("StockActivity", "omfg this works");
return 0;
}
Where the class calls the procedure and should send the HashMap
protected void onPostExecute(String file_url) {
try {
callWhenDone.call();
} catch (Exception e) {
Log.d("LoadAllDrinks", "Exception" + e);
}
}