Exemplo n.º 1
0
 @Override
 protected void onActivityResult(final int requestCode, int resultCode, final Intent data) {
   MediaManager.onActivityResult(this, handler, requestCode, resultCode, data);
 }
Exemplo n.º 2
0
  public void onClick(View v) {
    switch (v.getId()) {
      case R.id.title_next_ll:
        {
          nickName = StringManager.getStringByET(mNickName);
          if (StringManager.isEmpty(nickName)) {
            ToastManager.show(this, R.string.toast_nickname_empty);
            return;
          }
          if (!isSetHead) {
            ToastManager.show(this, R.string.toast_head_empty);
            return;
          }

          // //要传递的数据,
          HashMap<String, Object> map = new HashMap<String, Object>();
          // map.put("openid", "qq 第三方登录的唯一编号");//如果是第三方登录,加入唯一授权的唯一编码
          // map.put("uid", "weibo 第三方登录的唯一编号");
          Intent i = getIntent();
          DataService.sendRegisterUserInfo(
              i.getStringExtra("cellphone"),
              i.getStringExtra("pwd"),
              nickName,
              DataService.unParsePost(mPost.getText().toString().trim()),
              DataService.unParseGender(mSex.getText().toString().trim()),
              10.10,
              22.22,
              MediaManager.cropPhotoFile,
              handler);

          break;
        }
      case R.id.action_sheet_photo_camera_bt:
        {
          MediaManager.getPhotoFromCamera(this);
          dialog.dismiss();
          break;
        }
      case R.id.action_sheet_photo_album_bt:
        {
          MediaManager.getPhotoFromAlbum(this);
          dialog.dismiss();
          break;
        }
      case R.id.perfect_data_head:
        {
          View view = View.inflate(this, R.layout.layout_actionsheet_up_head, null);
          dialog = UIManager.getActionSheet(this, view);
          dialog.show();

          break;
        }
      case R.id.perfect_data_post_rl:
        {
          AlertDialog.Builder builder = new AlertDialog.Builder(this);
          // 1=控球后卫 2=得分后卫 3=小前锋 4=大前锋 5=中锋
          final String[] objects = {"控球后卫", "得分后卫", "小前锋", "大前锋 ", "中锋"};
          ArrayAdapter<String> adapter =
              new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, objects);

          builder.setAdapter(
              adapter,
              new OnClickListener() {

                @Override
                public void onClick(DialogInterface dialog, int which) {
                  mPost.setText(objects[which]);
                }
              });
          builder.create().show();
          break;
        }
      case R.id.perfect_data_sex_rl:
        {
          AlertDialog.Builder builder = new AlertDialog.Builder(this);
          final String[] objects = {"男", "女"};
          ArrayAdapter<String> adapter =
              new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, objects);

          builder.setAdapter(
              adapter,
              new OnClickListener() {

                @Override
                public void onClick(DialogInterface dialog, int which) {
                  mSex.setText(objects[which]);
                }
              });
          builder.create().show();
          break;
        }
    }
  }