예제 #1
0
        @Override
        public void onClick(View view) {
          switch (view.getId()) {
            case R.id.shop_top_right:
              ProgressRing.onProgeress(MainActivity.this, "智点", "正在定位...");

              if (helper != null) {
                helper.InitGPS();
              }
              break;
            case R.id.nouser_login:
              go2SignalActivity(SetLoginActivity.class);
              break;
            case R.id.nouser_register:
              go2SignalActivity(RegisterActivity.class);
              break;
            case R.id.headIcom:
              // TODO 判断是否登录
              // 已登录
              takePhoto();
              // 未登录
              go2SignalActivity(SetLoginActivity.class);
              break;
            case R.id.user_edit:
              // 修改个人信息
              go2SignalActivity(PersonInfoActivity.class);
              break;
          }
        }
예제 #2
0
        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {
          Intent intent = new Intent();
          if (helper.getApplyList().get(position).getLink().equals("ShareEatActivity")) {
            ProgressRing.onProgeress(MainActivity.this, "提示", "正在加载手机好友,请稍候....", 4000);
          }

          int lknum = Integer.valueOf(helper.getApplyList().get(position).getLknum());
          helper.getApplyList().get(position).setLknum("" + (lknum + 1));

          intent.setClassName(
              MainActivity.this,
              "com.gae.eat2013." + helper.getApplyList().get(position).getLink());
          MainActivity.this.startActivity(intent);
          MainActivity.this.finish();
          Toast.makeText(
                  MainActivity.this,
                  "跳转到" + helper.getApplyList().get(position).getLink(),
                  Toast.LENGTH_SHORT)
              .show();
        }