@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { switch (resultCode) { case 10: Toast.makeText(getActivity(),"haha",Toast.LENGTH_SHORT); Bundle a = data.getExtras(); String url = a.getString("picture"); String alterusername = a.getString("username"); Bitmap bm = BitmapFactory.decodeFile(url); avatarImg.setImageBitmap(bm); UserNameTextView.setText(alterusername); break; case 1: Bundle b = data.getExtras(); String index = b.getString("servicepointname"); UserFuWuTextView.setText(index);//设置服务范围的显示TextView break; case 20: Bundle c = data.getExtras(); String username = c.getString("UserName"); String userphone = c.getString("UserPhone"); UserPhoneTextView.setText(userphone); UserNameTextView.setText(username); break; } super.onActivityResult(requestCode, resultCode, data); }