本文整理了Java中androidx.fragment.app.Fragment.onActivityResult()
方法的一些代码示例,展示了Fragment.onActivityResult()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fragment.onActivityResult()
方法的具体详情如下:
包路径:androidx.fragment.app.Fragment
类名称:Fragment
方法名:onActivityResult
暂无
代码示例来源:origin: ankidroid/Anki-Android
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
deleteDummyCards();
}
代码示例来源:origin: ArthurHub/Android-Image-Cropper
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
CropImage.ActivityResult result = CropImage.getActivityResult(data);
handleCropResult(result);
}
}
代码示例来源:origin: ankidroid/Anki-Android
@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
Timber.d("onActivityResult (requestCode = %d, resultCode = %d)", requestCode, resultCode);
代码示例来源:origin: WireGuard/wireguard-android
@Override
public void onActivityResult(final int requestCode, final int resultCode, @Nullable final Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUEST_CODE_VPN_PERMISSION) {
if (pendingTunnel != null && pendingTunnelUp != null)
setTunnelStateWithPermissionsResult(pendingTunnel, pendingTunnelUp);
pendingTunnel = null;
pendingTunnelUp = null;
}
}
代码示例来源:origin: KDE/kdeconnect-android
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case RESULT_PAIRING_SUCCESFUL:
if (resultCode == 1) {
String deviceId = data.getStringExtra("deviceId");
mActivity.onDeviceSelected(deviceId);
}
break;
default:
super.onActivityResult(requestCode, resultCode, data);
}
}
代码示例来源:origin: esafirm/android-image-picker
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
List<Image> images = ImagePicker.getImages(data);
if (images != null && !images.isEmpty()) {
imageView.setImageBitmap(BitmapFactory.decodeFile(images.get(0).getPath()));
}
super.onActivityResult(requestCode, resultCode, data);
}
}
代码示例来源:origin: Gwokhov/Deadline
private void sendResult(int resultCode, boolean isDelete, String category) {
if (getTargetFragment() == null) {
return;
}
Intent intent = new Intent();
intent.putExtra(EXTRA_DELETE_CATEGORY, isDelete);
intent.putExtra(EXTRA_CATEGORY_NAME, category);
getTargetFragment().onActivityResult(getTargetRequestCode(), resultCode, intent);
}
}
代码示例来源:origin: andstatus/andstatus
@Override
public void onClick(DialogInterface dialog, int which) {
getTargetFragment().onActivityResult(getTargetRequestCode(), Activity.RESULT_OK, null);
}
})
代码示例来源:origin: andstatus/andstatus
@Override
public void onClick(DialogInterface dialog, int id) {
dialogFragment.getTargetFragment().onActivityResult(dialogFragment.getTargetRequestCode(), Activity.RESULT_OK, null);
}
})
代码示例来源:origin: Gwokhov/Deadline
private void sendResult(int resultCode, int typeData) {
if (getTargetFragment() == null) {
return;
}
Intent intent = new Intent();
intent.putExtra(EXTRA_REMIND, typeData);
getTargetFragment().onActivityResult(getTargetRequestCode(), resultCode, intent);
}
}
代码示例来源:origin: andstatus/andstatus
@Override
public void onClick(DialogInterface dialog, int id) {
dialogFragment.getTargetFragment().onActivityResult(dialogFragment.getTargetRequestCode(), Activity.RESULT_CANCELED, null);
}
});
代码示例来源:origin: Gwokhov/Deadline
private void sendResult(int resultCode, long date) {
if (getTargetFragment() == null) {
return;
}
Intent intent = new Intent();
intent.putExtra(EXTRA_DATE, date);
getTargetFragment().onActivityResult(getTargetRequestCode(), resultCode, intent);
}
}
代码示例来源:origin: Gwokhov/Deadline
private void sendResult(int resultCode, boolean hasOpen) {
if (getTargetFragment() == null) {
return;
}
Intent intent = new Intent();
intent.putExtra(EXTRA_HAS_OPEN_TYPE_TIPS, hasOpen);
getTargetFragment().onActivityResult(getTargetRequestCode(), resultCode, intent);
}
}
代码示例来源:origin: Gwokhov/Deadline
private void sendResult(int resultCode, boolean isConfirm) {
if (getTargetFragment() == null) {
return;
}
Intent intent = new Intent();
intent.putExtra(EXTRA_IS_CONFIRM, isConfirm);
getTargetFragment().onActivityResult(getTargetRequestCode(), resultCode, intent);
}
}
代码示例来源:origin: Gwokhov/Deadline
private void sendResult(int resultCode, int choice) {
if (getTargetFragment() == null) {
return;
}
Intent intent = new Intent();
intent.putExtra(EXTRA_CHOICE, choice);
getTargetFragment().onActivityResult(getTargetRequestCode(), resultCode, intent);
}
}
代码示例来源:origin: andstatus/andstatus
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (ActivityRequestCode.fromId(requestCode)) {
case REMOVE_ACCOUNT:
if (Activity.RESULT_OK == resultCode) {
onRemoveAccount();
}
break;
default:
super.onActivityResult(requestCode, resultCode, data);
break;
}
}
代码示例来源:origin: andstatus/andstatus
@Override
public void onClick(DialogInterface dialog, int which) {
getTargetFragment().onActivityResult(getTargetRequestCode(), Activity.RESULT_OK, null);
}
})
代码示例来源:origin: andstatus/andstatus
@Override
public void onClick(DialogInterface dialog, int id) {
dialogFragment.getTargetFragment().onActivityResult(dialogFragment.getTargetRequestCode(), Activity.RESULT_OK, null);
}
})
代码示例来源:origin: andstatus/andstatus
@Override
public void onClick(DialogInterface dialog, int id) {
dialogFragment.getTargetFragment().onActivityResult(dialogFragment.getTargetRequestCode(), Activity.RESULT_CANCELED, null);
}
});
代码示例来源:origin: Gwokhov/Deadline
private void sendResult(int resultCode, String category) {
if (getTargetFragment() == null) {
return;
}
Intent intent = new Intent();
intent.putExtra(EXTRA_CATEGORY, category);
getTargetFragment().onActivityResult(getTargetRequestCode(), resultCode, intent);
}
内容来源于网络,如有侵权,请联系作者删除!