本文整理汇总了Java中com.kbeanie.imagechooser.api.ChosenImage类的典型用法代码示例。如果您正苦于以下问题:Java ChosenImage类的具体用法?Java ChosenImage怎么用?Java ChosenImage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ChosenImage类属于com.kbeanie.imagechooser.api包,在下文中一共展示了ChosenImage类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onImageChosen
import com.kbeanie.imagechooser.api.ChosenImage; //导入依赖的package包/类
@Override
public void onImageChosen(ChosenImage chosenImage) {
chosenImages = chosenImage;
finalPath = chosenImages.getFilePathOriginal();
song.setAlbumArt(Uri.parse(finalPath));
if (getActivity() == null) {
return;
}
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
ChangeAlbumCover(finalPath, song.getmSongPath(), song.getAlbumId());
}
});
}
示例2: onImageChosen
import com.kbeanie.imagechooser.api.ChosenImage; //导入依赖的package包/类
@Override
public void onImageChosen(final ChosenImage chosenImage) {
runOnUiThread(new Runnable() {
@Override
public void run() {
Log.d("CI:", chosenImage.getFilePathOriginal());
if (null == mUploadMessage && mUploadMessageArray == null) return;
Uri result = Uri.fromFile(new File(chosenImage.getFileThumbnail()));
if (mUploadMessage != null) {
mUploadMessage.onReceiveValue(result);
mUploadMessage = null;
} else if (mUploadMessageArray != null) {
Uri[] uris = new Uri[1];
uris[0] = result;
mUploadMessageArray.onReceiveValue(uris);
}
}
});
}
示例3: onImageChosen
import com.kbeanie.imagechooser.api.ChosenImage; //导入依赖的package包/类
/**
* this method is for the Image what user choose to use.
* @param image -- the image what user want to use.
*/
@Override
public void onImageChosen(final ChosenImage image) {
runOnUiThread(new Runnable() {
@Override
public void run() {
progressBar.setVisibility(View.GONE);
if (image != null) {
textViewFile.setText(image.getFilePathOriginal());
filePath = image.getFilePathOriginal();
filePath2 = filePath;
imageViewThumbnail.setImageURI(Uri.parse(new File(image
.getFileThumbnail()).toString()));
imageViewThumbSmall.setImageURI(Uri.parse(new File(image
.getFileThumbnailSmall()).toString()));
}
}
});
}
示例4: onImageChosen
import com.kbeanie.imagechooser.api.ChosenImage; //导入依赖的package包/类
@Override
public void onImageChosen(ChosenImage chosenImage) {
chosenImages = chosenImage;
finalPath = chosenImages.getFilePathOriginal();
Log.d("BaseFragment", finalPath);
if (getActivity() == null) {
return;
}
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
changeArtwork();
}
});
}
示例5: onImageChosen
import com.kbeanie.imagechooser.api.ChosenImage; //导入依赖的package包/类
/**
* Selected image object
*
* @param image
*/
@Override
public void onImageChosen(ChosenImage image) {
if (image == null) return;
Uri originalFilePathUri = Uri.fromFile(new File(image.getFilePathOriginal()));
Uri thumbnailUri = Uri.fromFile(new File(image.getFilePathOriginal()));
showAttachment(originalFilePathUri, thumbnailUri);
}
示例6: getChosenImages
import com.kbeanie.imagechooser.api.ChosenImage; //导入依赖的package包/类
public ChosenImage getChosenImages() {
return chosenImages;
}
示例7: onImageChosen
import com.kbeanie.imagechooser.api.ChosenImage; //导入依赖的package包/类
/**
* Call the crop intent when the user chooses an image
*
* @param image image that the user has chosen
*/
@Override
public void onImageChosen(final ChosenImage image) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
if (image != null) {
// set the image to the circle view center
try {
Log.d("filePath: " + filePath);
filePath = image.getFilePathOriginal();
Log.d("filePath image.getFilePathOriginal(): " + filePath);
final Target loadTarget = new Target() {
@Override
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
circularView.getCenterCircle().setSrc(bitmap);
textType.setText(application.getString(R.string.type_camera));
hideProgressDialog();
}
@Override
public void onBitmapFailed(Drawable errorDrawable) {
circularView.getCenterCircle().setSrc(errorDrawable);
textType.setText(application.getString(R.string.type_error));
hideProgressDialog();
}
@Override
public void onPrepareLoad(Drawable placeHolderDrawable) {
}
};
// set the image tag
circularView.setTag(loadTarget);
Picasso.with(getActivity())
.load(new File(filePath))
.resize(circularView.getWidth(), circularView.getHeight())
.centerInside()
.transform(new CircleTransform())
.error(R.mipmap.ic_launcher)
.into(loadTarget);
// circularView.getCenterCircle().setSrc(FileUtils.getCroppedBitmapFromFile(circularView, mFileTemp));
} catch (Exception e) {
e.printStackTrace();
}
// change the state of the FAB
menu.findItem(R.id.action_add).setIcon(R.drawable.ic_clear);
// buttonCamera.setImageResource(R.drawable.ic_action_content_clear_white);
isPhotoSelected = true;
circularView.setEnabled(false);
}
}
});
}
示例8: onImageChosen
import com.kbeanie.imagechooser.api.ChosenImage; //导入依赖的package包/类
@Override
public void onImageChosen(ChosenImage chosenImage) {
}