private void dealWithHttpReturned(String result) { Gson gson = new Gson(); AcademyResult r = gson.fromJson(result, AcademyResult.class); String resultCode = r.getResult().getErrorcode(); if (HttpResult.SUCCESS.equals(resultCode)) { List<AcademyClass> academyClasses = r.getAcademys(); mItems.addAll(academyClasses); mAdapter.notifyDataSetChanged(); } else if (HttpResult.FAIL.equals(resultCode)) { } else { Toaster.showShort(AcademyActivity.this, "请求出错,请重试"); } }
private void dealWithHttpReturned(String result) { Gson gson = new Gson(); HttpResult r = gson.fromJson(result, HttpResult.class); String responseCode = r.getResult().getErrorcode(); if (HttpResult.SUCCESS.equals(responseCode)) { LockPatternUtils util = new LockPatternUtils(this); util.clearLock(); Toaster.showShort(this, "请重新设置密码"); ContextUtil.pushToActivity(this, GestureLockSettingActivity.class); finish(); } else if (HttpResult.FAIL.equals(responseCode)) { Toaster.showShort(this, r.getResult().getErrormsg()); } else { Toaster.showShort(this, "重置密码失败,请重试"); } }