예제 #1
0
  @Override
  protected void processLogic() {
    RequestVo categoryReqVo = new RequestVo();
    categoryReqVo.requestUrl = R.string.category;
    categoryReqVo.context = context;

    categoryReqVo.jsonParser = new CategoryParser();
    super.getDataFromServer(
        categoryReqVo,
        new DataCallback<List<CategoryVo>>() {

          @Override
          public void processData(List<CategoryVo> paramObject, boolean paramBoolean) {
            categoryInfos = paramObject;
            divide = new DivideCategoryList(categoryInfos);
            oneInfos = divide.getOneLevel();
            Logger.i(TAG, categoryInfos.size() + "");
            CategoryAdaper adapter = new CategoryAdaper(context, oneInfos);
            tv_category_empty.setVisibility(View.INVISIBLE);
            lv_category_list.setAdapter(adapter);
          }
        });
  }
 /** 重写父类的onDestroy()方法 */
 @Override
 protected void onDestroy() {
   SMSSDK.unregisterAllEventHandler(); // 调用反注册代码将其注销
   super.onDestroy();
   ECApplication.getInstance().removeActvity(this);
 }