2016-09-30 88 views

回答

0
fab_explore = (FloatingActionButton) findViewById(R.id.fab); 

    fab_explore.setOnClickListener(new View.OnClickListener() { 
     @Override 
     public void onClick(View view) { 
      Intent pickIntent = new Intent(Intent.ACTION_GET_CONTENT); 
      pickIntent.setType("image/*"); 
      Intent chooserIntent = Intent.createChooser(pickIntent,"Pick Picture"); 
      startActivityForResult(chooserIntent, CAPTURE_LOCAL_PHOTO_ACTIVITY_REQUEST_CODE); 
     } 
    }); 

现在对活动结果称这些访问路径通过photoeditor

if (requestCode == CAPTURE_LOCAL_PHOTO_ACTIVITY_REQUEST_CODE) { 
     if (resultCode == RESULT_OK) { 
      Uri imageUri = data.getData(); 


      Intent imageEditorIntent = new AdobeImageIntent.Builder(this) 
        .setData(imageUri) 
        .build(); 

      startActivityForResult(imageEditorIntent, 1); 


     } else if (resultCode == RESULT_CANCELED) { 
      Log.i("MainActivity", "onActivityResult: failed to get image"); 

     } else { 
     }