private void showFragment(Long id) { RequestForSend.getInstance().sendMePosts(id); Bundle sendBundle = getBundleWithParameters(id); Fragment openFragment = new UserFragment(); openFragment.setArguments(sendBundle); getSupportFragmentManager() .beginTransaction() .replace(R.id.content_frame, openFragment) .commit(); Logger.log(TAG, "show fragment with id " + id); }
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode == RESULT_OK) { if (requestCode == PHOTO_GET) { Uri selectedImageUri = data.getData(); String tempPath = getPath(selectedImageUri, userActivity); photoFile = tempPath; Bitmap bitMap; BitmapFactory.Options bitmapOptions = new BitmapFactory.Options(); bitMap = BitmapFactory.decodeFile(tempPath, bitmapOptions); addPhotoImageButton.setImageBitmap(bitMap); RequestForSend.getInstance().sendMeServerForUploadPhoto(); } } }