天天看點

callbacks

//定義一個接口

    public interface Icallbacks{

        void updateUiByjson(String jsonstr);

    }

  在AsyncTask的onPostExecute方法中調用去傳回請求的資料

 protected void onPostExecute(String s) {

        super.onPostExecute(s);

        //解析,封裝到bean,更新ui元件

        icallbacks.updateUiByjson(s);

    }