Ejemplo n.º 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);
  }
Ejemplo n.º 2
0
 @Override
 public void onContactsUtilsComplete(int option, boolean success) {
   dismissPendingDialog();
   if (success) {
     switch (option) {
       case OnContactsUtilsListener.option_add:
         mTitleRightIv.setImageResource(R.drawable.chatroom_contacts_option_is_contacts);
         ToastUtils.showToast("添加成功");
         break;
       case OnContactsUtilsListener.option_delete:
         mTitleRightIv.setImageResource(R.drawable.chatroom_contacts_option_not_contacts);
         ToastUtils.showToast("删除成功");
         break;
       case OnContactsUtilsListener.option_black:
         mTitleRightIv.setImageResource(R.drawable.chatroom_contacts_option_is_contacts);
         ToastUtils.showToast("已加入黑名单");
         break;
     }
   }
 }