@Override
  protected void onCreate(Bundle arg0) {
    super.onCreate(arg0);
    this.setContentView(R.layout.topiclist_activity);
    PullToRefreshAttacher.Options options = new PullToRefreshAttacher.Options();
    options.refreshScrollDistance = 0.3f;
    options.refreshOnUp = true;
    mPullToRefreshAttacher = PullToRefreshAttacher.get(this, options);

    if (ActivityUtil.isNotLessThan_4_0()) setNfcCallBack();

    if (null == findViewById(R.id.item_detail_container)) {
      dualScreen = false;
    }
    FragmentManager fm = getSupportFragmentManager();
    Fragment f1 = fm.findFragmentById(R.id.item_list);
    if (f1 == null) {
      f1 = new TopiclistContainer();
      Bundle args = new Bundle(); // (getIntent().getExtras());
      if (null != getIntent().getExtras()) {
        args.putAll(getIntent().getExtras());
      }
      args.putString("url", getIntent().getDataString());
      f1.setArguments(args);
      FragmentTransaction ft = fm.beginTransaction().add(R.id.item_list, f1);
      // .add(R.id.item_detail_container, f);
      ft.commit();
    }
    Fragment f2 = fm.findFragmentById(R.id.item_detail_container);
    if (null == f2) {
      f1.setHasOptionsMenu(true);
    } else if (!dualScreen) {
      this.setTitle(R.string.app_name);
      fm.beginTransaction().remove(f2).commit();
      f1.setHasOptionsMenu(true);
    } else {
      f1.setHasOptionsMenu(false);
      f2.setHasOptionsMenu(true);
    }

    int fid = getIntent().getIntExtra("fid", 0);
    if (fid != 0) {
      String boardName = BoardHolder.boardNameMap.get(fid);
      if (null != boardName) {
        strs[0] = boardName;
      }
    }
    int favor = getIntent().getIntExtra("favor", 0);
    int authorid = getIntent().getIntExtra("authorid", 0);
    if (favor == 0 && authorid == 0) {
      setNavigation();
    } else {
      flags = ThemeManager.ACTION_BAR_FLAG;
    }
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(getViewId());

    if (PhoneConfiguration.getInstance().uploadLocation
        && PhoneConfiguration.getInstance().location == null) {
      ActivityUtil.reflushLocation(this);
    }

    /*PullToRefreshViewPager
    refreshPager = (PullToRefreshViewPager) findViewById(R.id.pull_refresh_viewpager);
    refreshPager.setMode(Mode.PULL_FROM_START);
    refreshPager.setOnRefreshListener(new OnRefreshListener<ViewPager>(){

    	@Override
    	public void onRefresh(PullToRefreshBase<ViewPager> refreshView) {
    		finish();

    	}

    });

    mViewPager = refreshPager.getRefreshableView();
    */

    mViewPager = (ViewPager) findViewById(R.id.pager);
    if (ActivityUtil.isNotLessThan_4_0()) {
      setNfcCallBack();
    }

    tid = 7;
    int pageFromUrl = 0;
    String url = this.getIntent().getDataString();
    if (null != url) {
      tid = this.getUrlParameter(url, "tid");
      pid = this.getUrlParameter(url, "pid");
      authorid = this.getUrlParameter(url, "authorid");
      pageFromUrl = this.getUrlParameter(url, "page");
    } else {
      tid = this.getIntent().getIntExtra("tid", 0);
      pid = this.getIntent().getIntExtra("pid", 0);
      authorid = this.getIntent().getIntExtra("authorid", 0);
    }

    View v = findViewById(android.R.id.content); // .getChildAt(0);
    tabhost = (TabHost) findViewById(android.R.id.tabhost);

    if (tabhost != null) {
      tabhost.setup();
      mTabsAdapter = new TabsAdapter(this, tabhost, mViewPager, ArticleListFragment.class);
    } else {
      mTabsAdapter =
          new ThreadFragmentAdapter(
              this, getSupportFragmentManager(), mViewPager, ArticleListFragment.class);
    }

    mTabsAdapter.setArgument("id", tid);
    mTabsAdapter.setArgument("pid", pid);
    mTabsAdapter.setArgument("authorid", authorid);
    ActivityUtil.getInstance().noticeSaying(this);

    if (savedInstanceState != null) {
      int pageCount = savedInstanceState.getInt("pageCount");
      if (pageCount != 0) {
        mTabsAdapter.setCount(pageCount);
        mViewPager.setCurrentItem(savedInstanceState.getInt("tab"));
      }

    } else if (0 != getUrlParameter(url, "page")) {

      mTabsAdapter.setCount(pageFromUrl);
      mViewPager.setCurrentItem(pageFromUrl);
    }
  }