예제 #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    mMarket = (User) getIntent().getSerializableExtra(EXTRA_MARKET);
    super.onCreate(savedInstanceState);
    if (mMarket == null) {
      ToastUtils.showToast("参数错误");
      finish();
      return;
    }
    Bundle bundle = new Bundle();
    bundle.putSerializable(EXTRA_MARKET, mMarket);
    mFragments = new ArrayList<Fragment>();

    mInfoScreenFragment = new InfoScreenFragment();
    mInfoScreenFragment.setArguments(bundle);
    mFragments.add(mInfoScreenFragment);

    FreightStationListFragment stationList = new FreightStationListFragment();
    stationList.setArguments(bundle);
    mFragments.add(stationList);

    mTabRoot.setBackgroundColor(Color.argb(0xff, 0x00, 0x9c, 0xff));
    int top = DimensionUtls.getPixelFromDpInt(10);
    int bottom = DimensionUtls.getPixelFromDpInt(15);
    mTabRoot.setPadding(bottom, top, bottom, bottom);
  }
예제 #2
0
 @Override
 public void onBackPressed() {
   if (mInfoScreenFragment.onBackPressed()) {
     return;
   }
   super.onBackPressed();
 }