@Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    Log.d(TAG, "onActivityResult");
    super.onActivityResult(requestCode, resultCode, data);
    if (data == null) {
      Log.d(TAG, "onActivityResult but data is null");
      return;
    }
    switch (requestCode) {
      case SelectLeagueActivity.ACTION_SELECT_LEAGUE:
        {
          // handle select league result (return a league id list)
          ArrayList<String> selectedList = null;
          selectedList = data.getStringArrayListExtra(SelectLeagueActivity.KEY_SELECTED_LEAGUE);
          if (selectedList == null) {
            Log.d(TAG, "onActivityResult but select league list is null");
            return;
          }

          Log.d(TAG, "onActivityResult, select league list is " + selectedList);
          //			Set<String> selectedSet = new HashSet<String>();
          selectedSet.clear();
          selectedSet.addAll(selectedList);
          leagueManager.setFilterLeagueSet(selectedSet);
          oddsManager.setFilterLeagueIdList(selectedList);
          this.reloadListDataAndView();
        }
        break;
      case SelectCompanyActivity.ACTION_SELECT_COMPANY:
        {
          // handle companyId here
          ArrayList<String> selectedList = null;
          selectedList = data.getStringArrayListExtra(SelectCompanyActivity.KEY_SELECTED_COMPANY);
          if (selectedList == null) {
            Log.d(TAG, "onActivityResult but select company list is null");
            return;
          }
          Log.d(TAG, "onActivityResult, select company list is " + selectedList);
          setCompanyIdFromList(selectedList);
          loadAllOddsData();
          this.reloadListDataAndView();
        }
        break;

      default:
        break;
    }
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {

    isTopActivity = true;

    super.onCreate(savedInstanceState);
    setContentView(R.layout.realindex2);

    matchManager = getMatchManager();
    indexService = getIndexService();
    oddsManager = indexService.getOddsManager();
    companyManager = indexService.getCompanyManager();
    leagueManager = indexService.getLeagueManager();
    date = DateUtil.dateToStringByFormat(new Date(), DATE_FORMAT);

    // 加载赔率公司数据
    loadCompanyData();

    buttonFilterCompany = (Button) findViewById(R.id.button_filter_company_type);
    buttonFilterLeague = (Button) findViewById(R.id.button_filter_league);
    buttonLookBack = (Button) findViewById(R.id.button_lookback);
    buttonFilterScoreType = (Button) findViewById(R.id.button_filter_score_type);

    setFilterCompanyButtonOnClickListener();
    setFilterLeagueButtonOnClickListener();
    setLookBackButtonOnClickListener();
    setFilterLevelButtonOnClickListener();

    initListView();

    // init no match title view
    noOddsTextView = (TextView) findViewById(R.id.no_real_odds_view);
    updateNoOddsTextView();

    indexService.addOddsLiveUpdateObserver(this);
  }
 @Override
 public void onRefresh() {
   super.onRefresh();
   loadAllOddsData();
 }
 @Override
 protected void onPause() {
   super.onPause();
   ScoreApplication.currentActivity = null;
 }
 @Override
 protected void onResume() {
   super.onResume();
   listView.onRefreshComplete();
   ScoreApplication.currentActivity = this;
 }