コード例 #1
0
  @Override
  public void onClick(View arg0) {
    Bundle bundle;
    switch (arg0.getId()) {
      case R.id.btn_choose_receive_goods:
        bundle = new Bundle();
        bundle.putString("seller_id", seller_id);
        bundle.putString("factoryName", factoryName);
        ActivitySwitch.openActivity(
            ChooseExchangeProdectActivity.class, bundle, this.getActivity());
        break;
      case R.id.btn_choose_send_goods:
        break;
      case R.id.commit:
        commitApply();
        break;

      default:
        break;
    }
  }
コード例 #2
0
ファイル: ProductListActivity.java プロジェクト: caocf/Tjxl
    @Override
    public void onClick(View v) {

      switch (v.getId()) {
        case R.id.view_back:
          ActivitySwitch.finishActivity(ProductListActivity.this);
          break;
        case R.id.right_menu_btn:
          setPopupwindow();
          break;
        case R.id.bottom_multiple:
          isChangeOrd = false;
          mode = -1;
          btn_multiple.setTextColor(getResources().getColor(R.color.sheng_red));
          btn_sale.setTextColor(getResources().getColor(R.color.button_text));
          mTvPrice.setTextColor(getResources().getColor(R.color.button_text));
          btn_filter.setTextColor(getResources().getColor(R.color.button_text));
          lineMultiple.setBackgroundColor(getResources().getColor(R.color.sheng_red));
          lineSale.setBackgroundColor(getResources().getColor(R.color.white));
          linePrice.setBackgroundColor(getResources().getColor(R.color.white));
          lineFilter.setBackgroundColor(getResources().getColor(R.color.white));
          showShoesListFragment();
          if (mDataMultiple.size() <= 0) {
            searchProduct();
          } else {
            shoesListFragment.reflesh(mDataMultiple, mode);
          }
          break;
        case R.id.bottom_sale:
          isChangeOrd = false;
          mode = 1;
          btn_multiple.setTextColor(getResources().getColor(R.color.button_text));
          btn_sale.setTextColor(getResources().getColor(R.color.sheng_red));
          mTvPrice.setTextColor(getResources().getColor(R.color.button_text));
          btn_filter.setTextColor(getResources().getColor(R.color.button_text));
          lineMultiple.setBackgroundColor(getResources().getColor(R.color.white));
          lineSale.setBackgroundColor(getResources().getColor(R.color.sheng_red));
          linePrice.setBackgroundColor(getResources().getColor(R.color.white));
          lineFilter.setBackgroundColor(getResources().getColor(R.color.white));
          showShoesListFragment();
          if (mDataSale.size() <= 0) {
            searchProduct();
          } else {
            shoesListFragment.reflesh(mDataSale, mode);
          }

          break;
        case R.id.ll_price:
          mode = 2;
          if (isChangeOrd) {
            if (priceOrd == -1) {
              priceOrd = 1;
            } else {
              priceOrd = -1;
            }
          } else {
            isChangeOrd = true;
          }

          if (priceOrd == -1) {
            mIcon.setImageResource(R.drawable.jt_s);

            if (mDataPriceInc.size() <= 0) {
              searchProduct();
            } else {
              shoesListFragment.reflesh(mDataPriceInc, mode);
            }
          } else {
            mIcon.setImageResource(R.drawable.jt);

            if (mDataPriceDec.size() <= 0) {
              searchProduct();
            } else {
              shoesListFragment.reflesh(mDataPriceDec, mode);
            }
          }

          btn_multiple.setTextColor(getResources().getColor(R.color.button_text));
          btn_sale.setTextColor(getResources().getColor(R.color.button_text));
          mTvPrice.setTextColor(getResources().getColor(R.color.sheng_red));
          btn_filter.setTextColor(getResources().getColor(R.color.button_text));
          lineMultiple.setBackgroundColor(getResources().getColor(R.color.white));
          lineSale.setBackgroundColor(getResources().getColor(R.color.white));
          linePrice.setBackgroundColor(getResources().getColor(R.color.sheng_red));
          lineFilter.setBackgroundColor(getResources().getColor(R.color.white));
          showShoesListFragment();

          break;
        case R.id.bottom_filter:
          isChangeOrd = false;
          btn_multiple.setTextColor(getResources().getColor(R.color.button_text));
          btn_sale.setTextColor(getResources().getColor(R.color.button_text));
          mTvPrice.setTextColor(getResources().getColor(R.color.button_text));
          btn_filter.setTextColor(getResources().getColor(R.color.sheng_red));
          lineMultiple.setBackgroundColor(getResources().getColor(R.color.white));
          lineSale.setBackgroundColor(getResources().getColor(R.color.white));
          linePrice.setBackgroundColor(getResources().getColor(R.color.white));
          lineFilter.setBackgroundColor(getResources().getColor(R.color.sheng_red));
          showFilterFragment();
          productFilterFragment.refresh();
          break;
        default:
          break;
      }
    }
コード例 #3
0
 @Override
 public void onClick(View v) {
   Bundle bundle = null;
   switch (v.getId()) {
     case R.id.btn_user_info: // 账户信息
       if (!AppContext.isLogin) {
         ActivitySwitch.openActivity(LoginActivity.class, null, getActivity());
       } else {
         bundle = new Bundle();
         ActivitySwitch.openActivity(UserInfoActivity.class, bundle, getActivity());
       }
       break;
     case R.id.btn_message_center: // 系统消息
       if (!AppContext.isLogin) {
         ActivitySwitch.openActivity(LoginActivity.class, null, getActivity());
       } else {
         ActivitySwitch.openActivity(MessageListActivity.class, null, this.getActivity());
       }
       break;
     case R.id.btn_collection_fac: // 收藏厂家
       if (!AppContext.isLogin) {
         ActivitySwitch.openActivity(LoginActivity.class, null, getActivity());
       } else {
         bundle = new Bundle();
         bundle.putInt("index", 2);
         ActivitySwitch.openActivity(MyCollectionsActivity.class, bundle, this.getActivity());
       }
       break;
     case R.id.btn_collection_pro: // 收藏商品
       if (!AppContext.isLogin) {
         ActivitySwitch.openActivity(LoginActivity.class, null, getActivity());
       } else {
         bundle = new Bundle();
         bundle.putInt("index", 1);
         ActivitySwitch.openActivity(MyCollectionsActivity.class, bundle, this.getActivity());
       }
       break;
     case R.id.btn_order_center: // 订单中心
       if (!AppContext.isLogin) {
         ActivitySwitch.openActivity(LoginActivity.class, null, getActivity());
       } else {
         bundle = new Bundle();
         bundle.putString("from", "-1");
         ActivitySwitch.openActivity(OrderListActivity.class, bundle, this.getActivity());
       }
       break;
     case R.id.btn_shz: // 售后中
       if (!AppContext.isLogin) {
         ActivitySwitch.openActivity(LoginActivity.class, null, getActivity());
       } else {
         bundle = new Bundle();
         bundle.putString("from", "5");
         ActivitySwitch.openActivity(OrderListActivity.class, bundle, getActivity());
       }
       break;
     case R.id.btn_dpj: // 待评价
       if (!AppContext.isLogin) {
         ActivitySwitch.openActivity(LoginActivity.class, null, getActivity());
       } else {
         bundle = new Bundle();
         bundle.putString("from", "4");
         ActivitySwitch.openActivity(OrderListActivity.class, bundle, getActivity());
       }
       break;
     case R.id.btn_dsh: // 待收货
       if (!AppContext.isLogin) {
         ActivitySwitch.openActivity(LoginActivity.class, null, getActivity());
       } else {
         bundle = new Bundle();
         bundle.putString("from", "3");
         ActivitySwitch.openActivity(OrderListActivity.class, bundle, getActivity());
       }
       break;
     case R.id.btn_dfh: // 待发货
       if (!AppContext.isLogin) {
         ActivitySwitch.openActivity(LoginActivity.class, null, getActivity());
       } else {
         bundle = new Bundle();
         bundle.putString("from", "2");
         ActivitySwitch.openActivity(OrderListActivity.class, bundle, getActivity());
       }
       break;
     case R.id.btn_dsk: // 待付款
       if (!AppContext.isLogin) {
         ActivitySwitch.openActivity(LoginActivity.class, null, getActivity());
       } else {
         bundle = new Bundle();
         bundle.putString("from", "1");
         bundle.putString("tag", "1");
         ActivitySwitch.openActivity(OrderListActivity.class, bundle, getActivity());
       }
       break;
     case R.id.btn_setting: // 系统设置
       ActivitySwitch.openActivity(SettingActivity.class, null, this.getActivity());
       break;
     case R.id.ci_user: // 用户头像
       if (!AppContext.isLogin) {
         ActivitySwitch.openActivity(LoginActivity.class, null, getActivity());
       } else {
         bundle = new Bundle();
         ActivitySwitch.openActivity(UserInfoActivity.class, bundle, getActivity());
       }
       break;
   }
 }