示例#1
0
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   super.onActivityResult(requestCode, resultCode, data);
   if (requestCode == 2 && data != null) {
     boolean flag = data.getBooleanExtra("flag", false);
     if (flag) {
       Intent intent = new Intent();
       intent.putExtra("flag", flag);
       setResult(1, intent);
       finish();
       Utils.rightOut(this);
     } else {
       String cirName = data.getStringExtra("circleName");
       String circleDescriptionStr = data.getStringExtra("circleDescription");
       Bitmap bmp = data.getParcelableExtra("cirBmp");
       if (bmp != null) {
         circleLogo.setImageBitmap(bmp);
       }
       circleName.setText(cirName);
       titleName.setText(cirName);
       circleDescription.setText(circleDescriptionStr);
       Intent intent = new Intent();
       intent.setAction(Constants.UPDECIRNAME);
       intent.putExtra("cirName", cirName);
       intent.putExtra("cid", cid);
       BroadCast.sendBroadCast(this, intent);
     }
   }
 }
示例#2
0
  @Override
  public void onClick(View v) {

    switch (v.getId()) {
      case R.id.circleLogo:
        break;
      case R.id.btnDissolve:
        PostTask("/circles/idissolve");
        type = 2;
        break;
      case R.id.btnExit:
        PostTask("/circles/iquit");
        type = 1;
        break;
      case R.id.back:
        Intent it = new Intent();
        it.putExtra("flag", false);
        setResult(1, it);
        finish();
        Utils.rightOut(this);
        break;
      case R.id.edit:
        Intent intent = new Intent();
        intent.setClass(this, EditCircleActivity.class);
        intent.putExtra("cid", cid);
        // startActivity(intent);
        startActivityForResult(intent, 2);
        Utils.leftOutRightIn(this);
        // finish();
        break;
      default:
        break;
    }
  }
示例#3
0
 private void exitSuccess() {
   // Home.exitCircle(cid);
   Intent acIntent = new Intent();
   acIntent.setAction(Constants.EXIT_CIRCLE);
   acIntent.putExtra("cid", cid);
   BroadCast.sendBroadCast(this, acIntent);
   Intent intent = new Intent();
   intent.putExtra("flag", true);
   setResult(1, intent);
   finish();
   Utils.rightOut(this);
 }