use of com.waz.api.ImageAsset in project wire-android by wireapp.
the class GiphyGridViewAdapter method onBindViewHolder.
@Override
public void onBindViewHolder(final ViewHolder holder, int position) {
final ImageAsset imageAsset = giphyResults.get(position);
holder.setImageAsset(imageAsset, position);
}
use of com.waz.api.ImageAsset in project wire-android by wireapp.
the class ConversationFragment method sendImage.
private void sendImage(Uri uri) {
ImageAsset imageAsset = ImageAssetFactory.getImageAsset(uri);
getStoreFactory().getConversationStore().sendMessage(imageAsset);
}
use of com.waz.api.ImageAsset in project wire-android by wireapp.
the class ImageSharingPreviewFragment method showShareImagePreview.
private void showShareImagePreview() {
SharedContentType sharedContentType = getControllerFactory().getSharingController().getSharedContentType();
if (sharedContentType == null) {
return;
}
String title = "";
IConversation currentConversation = getControllerFactory().getSharingController().getDestination();
List<Uri> sharedImageUris = getControllerFactory().getSharingController().getSharedFileUris();
Uri previewImageUri = sharedImageUris.get(0);
switch(sharedContentType) {
case IMAGE:
title = String.format(getString(R.string.sharing__image_preview__title__single), currentConversation.getName().toUpperCase(getResources().getConfiguration().locale));
break;
}
ImagePreviewLayout imagePreview = (ImagePreviewLayout) LayoutInflater.from(getContext()).inflate(R.layout.fragment_cursor_images_preview, imagePreviewContainer, false);
imagePreview.showSketch(false);
ImageAsset imageAsset = ImageAssetFactory.getImageAsset(previewImageUri);
imagePreview.setImageAsset(imageAsset, ImagePreviewLayout.Source.CAMERA, this);
imagePreview.setAccentColor(getControllerFactory().getAccentColorController().getAccentColor().getColor());
imagePreview.setTitle(title);
imagePreview.hightlightTitle();
imagePreview.setTitleIsSingleLine(false);
imagePreviewContainer.addView(imagePreview);
}
Aggregations