本文整理汇总了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());
}
});
}
开发者ID:RajneeshSingh007,项目名称:MusicX-music-player,代码行数:17,代码来源:TagEditorFragment.java
示例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);
}
}
});
}
开发者ID:coomar2841,项目名称:WebViewUploadFile,代码行数:20,代码来源:MainActivity.java
示例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()));
}
}
});
}
开发者ID:CMPUT301W14T11,项目名称:Team11Prototype,代码行数:24,代码来源:ChoseImageActivity.java
示例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();
}
});
}
开发者ID:RajneeshSingh007,项目名称:MusicX-music-player,代码行数:16,代码来源:BasePlayingFragment.java
示例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);
}
开发者ID:buddycloud,项目名称:buddycloud-android,代码行数:15,代码来源:PostNewTopicActivity.java
示例6: getChosenImages
import com.kbeanie.imagechooser.api.ChosenImage; //导入依赖的package包/类
public ChosenImage getChosenImages() {
return chosenImages;
}
开发者ID:RajneeshSingh007,项目名称:MusicX-music-player,代码行数:4,代码来源:BasePlayingFragment.java
示例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);
}
}
});
}
开发者ID:Drakuwa,项目名称:Fridge,代码行数:67,代码来源:AddItemFragment.java
示例8: onImageChosen
import com.kbeanie.imagechooser.api.ChosenImage; //导入依赖的package包/类
@Override
public void onImageChosen(ChosenImage chosenImage) {
}
开发者ID:bhm,项目名称:Cthulhator,代码行数:5,代码来源:CharacterViewerActivity.java
注:本文中的com.kbeanie.imagechooser.api.ChosenImage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论