本文整理汇总了Java中com.jph.takephoto.model.TResult类的典型用法代码示例。如果您正苦于以下问题:Java TResult类的具体用法?Java TResult怎么用?Java TResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TResult类属于com.jph.takephoto.model包,在下文中一共展示了TResult类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: selectPicture
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
private void selectPicture(int defaultIndex, boolean isCrop) {
this.fromType = TImage.FromType.OTHER;
if (takePhotoOptions != null && takePhotoOptions.isWithOwnGallery()) {
onPickMultiple(1);
return;
}
if (PermissionManager.TPermissionType.WAIT.equals(permissionType)) return;
ArrayList<TIntentWap> intentWapList = new ArrayList<>();
intentWapList.add(new TIntentWap(IntentUtils.getPickIntentWithDocuments(), isCrop ? TConstant.RC_PICK_PICTURE_FROM_DOCUMENTS_CROP : TConstant.RC_PICK_PICTURE_FROM_DOCUMENTS_ORIGINAL));
intentWapList.add(new TIntentWap(IntentUtils.getPickIntentWithGallery(), isCrop ? TConstant.RC_PICK_PICTURE_FROM_GALLERY_CROP : TConstant.RC_PICK_PICTURE_FROM_GALLERY_ORIGINAL));
try {
TUtils.sendIntentBySafely(contextWrap, intentWapList, defaultIndex, isCrop);
} catch (TException e) {
takeResult(TResult.of(TImage.of("", fromType)), e.getDetailMessage());
e.printStackTrace();
}
}
示例2: onPickFromCapture
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
@Override
public void onPickFromCapture(Uri outPutUri) {
this.fromType = TImage.FromType.CAMERA;
if (PermissionManager.TPermissionType.WAIT.equals(permissionType)) return;
if (Build.VERSION.SDK_INT >= 23) {
this.outPutUri = TUriParse.convertFileUriToFileProviderUri(contextWrap.getActivity(), outPutUri);
} else {
this.outPutUri = outPutUri;
}
try {
TUtils.captureBySafely(contextWrap, new TIntentWap(IntentUtils.getCaptureIntent(this.outPutUri), TConstant.RC_PICK_PICTURE_FROM_CAPTURE));
} catch (TException e) {
takeResult(TResult.of(TImage.of("", fromType)), e.getDetailMessage());
e.printStackTrace();
}
}
示例3: onPickFromCaptureWithCrop
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
@Override
public void onPickFromCaptureWithCrop(Uri outPutUri, CropOptions options) {
this.fromType = TImage.FromType.CAMERA;
if (PermissionManager.TPermissionType.WAIT.equals(permissionType)) return;
this.cropOptions = options;
this.outPutUri = outPutUri;
if (Build.VERSION.SDK_INT >= 23) {
this.tempUri = TUriParse.getTempUri(contextWrap.getActivity());
} else {
this.tempUri = outPutUri;
}
try {
TUtils.captureBySafely(contextWrap, new TIntentWap(IntentUtils.getCaptureIntent(this.tempUri), TConstant.RC_PICK_PICTURE_FROM_CAPTURE_CROP));
} catch (TException e) {
takeResult(TResult.of(TImage.of("", fromType)), e.getDetailMessage());
e.printStackTrace();
}
}
示例4: cropContinue
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
private void cropContinue(boolean preSuccess) {
Map result = multipleCrop.setCropWithUri(outPutUri, preSuccess);
int index = (int) result.get("index");
boolean isLast = (boolean) result.get("isLast");
if (isLast) {
if (preSuccess) {
takeResult(TResult.of(multipleCrop.gettImages()));
} else {
takeResult(TResult.of(multipleCrop.gettImages()), outPutUri.getPath() + contextWrap.getActivity().getResources().getString(R.string.msg_crop_canceled));
}
} else {
cropWithNonException(multipleCrop.getUris().get(index + 1), multipleCrop.getOutUris().get(index + 1), cropOptions);
}
}
示例5: takeSuccess
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
@Override
public void takeSuccess(TResult result) {
Log.i(TAG,"takeSuccess:" + result.getImage().getCompressPath());
}
示例6: takeFail
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
@Override
public void takeFail(TResult result,String msg) {
Log.i(TAG, "takeFail:" + msg);
}
示例7: takeFail
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
@Override
public void takeFail(TResult result, String msg) {
super.takeFail(result, msg);
}
示例8: takeSuccess
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
@Override
public void takeSuccess(TResult result) {
super.takeSuccess(result);
showImg(result.getImages());
}
示例9: takeFail
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
@Override
public void takeFail(TResult result,String msg) {
super.takeFail(result,msg);
}
示例10: takeFail
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
@Override
public void takeFail(TResult result, String msg) {
Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();
}
示例11: takeSuccess
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
@Override
public void takeSuccess(TResult result) {
}
示例12: takeFail
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
@Override
public void takeFail(TResult result, String msg) {
}
示例13: takeSuccess
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
@Override
public void takeSuccess(TResult result) {
// Log.i("zj", "takeSuccess:" + result.getImage().getCompressPath());
}
示例14: takeFail
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
@Override
public void takeFail(TResult result, String msg) {
// Log.i("zj", "takeFail:" + msg);
}
示例15: takeSuccess
import com.jph.takephoto.model.TResult; //导入依赖的package包/类
void takeSuccess(TResult result);