@Override
  protected void onResume() {
    Log.e("onResume", "onResume");
    // tv_tab1.setText("回执报告");
    if (pop != null) {
      pop.dismiss();
      pop = null;
    }
    // queryData();
    if (binddatatool != null) {
      binddatatool.clearPortraitMaps();
    }
    madapter.clearCacheNum();
    all_reals.clear();
    showsel = false;
    selitem.clear();
    click_type = 0;
    // ll_maincontent.removeAllViews();

    if (firstIn && (!getService(ICopyOldData.class).isImportFinish())) {
      getService(IEventRouter.class).registerEventListener(ImporDataOKEvent.class, listener);
    }

    if (click_style) {
      // if (gongnengline == null) {
      // gongnengline = getSecondView();
      // }
      // huizhi_gongnen_div.setVisibility(View.VISIBLE);
      // huizhi_listview_div.setVisibility(View.GONE);
      // huizhi_empty_text.setVisibility(View.GONE);

    } else {
      refetchData();
    }
    Log.i("click_type", click_type + "");

    firstIn = false;

    super.onResume();
  }
  @Override
  protected void onCreate(Bundle arg0) {
    super.onCreate(arg0);
    setContentView(R.layout.huizhi_mainpage22);
    ((com.wxxr.callhelper.qg.widget.BottomTabBar) findViewById(R.id.home_bottom_tabbar))
        .setActivtiy(this, 0);

    sp = NSharedPreferences.getInstance(getApplicationContext());
    sp.get(Constant.HUIZHI_STYLE, 0);
    sp.get("menu_open", false);
    sp.update("menu_open", false);
    hdao = HuiZhiBaoGaoDao.getInstance(this);
    array_mainlist_main = new ArrayList<ArrayList<BodyBeanHuiZhi>>();
    all_reals = new ArrayList<BodyBeanHuiZhi>();

    // all = hdao.queryAllHuiZhi();
    // all_reals = getRealContent(all);

    // queryData();
    // LinearLayout ll = (LinearLayout)
    // findViewById(R.id.ll_huizhi_main_bg);
    // Bitmap readBitmap = Tools.readBitmap(this,
    // R.drawable.main_bg_communication);
    // BitmapDrawable bitmapDrawable = new BitmapDrawable(readBitmap);
    // ll.setBackgroundDrawable(bitmapDrawable);

    ll_main_total = (RelativeLayout) findViewById(R.id.ll_huizhi_main_bg);
    infater = LayoutInflater.from(this);
    metric = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(metric);
    binddatatool = DCMyViewGroupHuiZhiBaoGao.getInstance(this, metric, null, 0);
    // ll_maincontent = (LinearLayout) findViewById(R.id.ll_main_content);

    madapter = new HuizhiAdapter();

    findView();

    Intent intent = getIntent();
    String flag = intent.getStringExtra("shouye");
    // ll_maincontent.removeAllViews();

    // huizhi_empty_text.setText(str_all);
    // if (flag == null) {
    // View view = getFirstView(all_reals, str_all, click_type);
    // // if (view != null) {
    // // ll_maincontent.addView(view);
    // // }
    //
    // } else if (flag.equals("shouye")) {
    // View view = getFirstView(all_reals, str_all, click_type);
    // // if (view != null) {
    // // ll_maincontent.addView(getFirstView(all_reals, str_all,
    // // click_type));
    // // }
    //
    // click_style = false;
    //
    // // rl_tab1.setBackgroundResource(R.drawable.title_qian_xuanzhong);
    // // rl_tab2.setBackgroundDrawable(null);
    //
    // } else {
    // // ll_maincontent.addView(getSecondView());
    //
    // }

    IntentFilter testAction = new IntentFilter("com.wxxr.viewgroup.refreshhuizhiall");
    rcrReceiver = new RefreshContentReceiverHZ();
    registerReceiver(rcrReceiver, testAction);
  }