本文整理汇总了Java中org.telegram.messenger.MediaController.AlbumEntry方法的典型用法代码示例。如果您正苦于以下问题:Java MediaController.AlbumEntry方法的具体用法?Java MediaController.AlbumEntry怎么用?Java MediaController.AlbumEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.telegram.messenger.MediaController
的用法示例。
在下文中一共展示了MediaController.AlbumEntry方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PhotoPickerAlbumsCell
import org.telegram.messenger.MediaController; //导入方法依赖的package包/类
public PhotoPickerAlbumsCell(Context context) {
super(context);
albumEntries = new MediaController.AlbumEntry[4];
albumViews = new AlbumView[4];
for (int a = 0; a < 4; a++) {
albumViews[a] = new AlbumView(context);
addView(albumViews[a]);
albumViews[a].setVisibility(INVISIBLE);
albumViews[a].setTag(a);
albumViews[a].setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (delegate != null) {
delegate.didSelectAlbum(albumEntries[(Integer) v.getTag()]);
}
}
});
}
}
示例2: setAlbum
import org.telegram.messenger.MediaController; //导入方法依赖的package包/类
public void setAlbum(int a, MediaController.AlbumEntry albumEntry) {
albumEntries[a] = albumEntry;
if (albumEntry != null) {
AlbumView albumView = albumViews[a];
albumView.imageView.setOrientation(0, true);
if (albumEntry.coverPhoto != null && albumEntry.coverPhoto.path != null) {
albumView.imageView.setOrientation(albumEntry.coverPhoto.orientation, true);
if (albumEntry.coverPhoto.isVideo) {
albumView.imageView.setImage("vthumb://" + albumEntry.coverPhoto.imageId + ":" + albumEntry.coverPhoto.path, null, getContext().getResources().getDrawable(R.drawable.nophotos));
} else {
albumView.imageView.setImage("thumb://" + albumEntry.coverPhoto.imageId + ":" + albumEntry.coverPhoto.path, null, getContext().getResources().getDrawable(R.drawable.nophotos));
}
} else {
albumView.imageView.setImageResource(R.drawable.nophotos);
}
albumView.nameTextView.setText(albumEntry.bucketName);
albumView.countTextView.setText(String.format("%d", albumEntry.photos.size()));
} else {
albumViews[a].setVisibility(INVISIBLE);
}
}
示例3: PhotoPickerActivity
import org.telegram.messenger.MediaController; //导入方法依赖的package包/类
public PhotoPickerActivity(int type, MediaController.AlbumEntry selectedAlbum, HashMap<Integer, MediaController.PhotoEntry> selectedPhotos, HashMap<String, MediaController.SearchImage> selectedWebPhotos, ArrayList<MediaController.SearchImage> recentImages, boolean onlyOnePhoto, ChatActivity chatActivity) {
super();
this.selectedAlbum = selectedAlbum;
this.selectedPhotos = selectedPhotos;
this.selectedWebPhotos = selectedWebPhotos;
this.type = type;
this.recentImages = recentImages;
this.singlePhoto = onlyOnePhoto;
this.chatActivity = chatActivity;
if (selectedAlbum != null && selectedAlbum.isVideo) {
singlePhoto = true;
}
}
示例4: openPhotoPicker
import org.telegram.messenger.MediaController; //导入方法依赖的package包/类
private void openPhotoPicker(MediaController.AlbumEntry albumEntry, int type) {
ArrayList<MediaController.SearchImage> recentImages = null;
if (albumEntry == null) {
if (type == 0) {
recentImages = recentWebImages;
} else if (type == 1) {
recentImages = recentGifImages;
}
}
PhotoPickerActivity fragment = new PhotoPickerActivity(type, albumEntry, selectedPhotos, selectedWebPhotos, recentImages, singlePhoto, chatActivity);
fragment.setDelegate(new PhotoPickerActivity.PhotoPickerActivityDelegate() {
@Override
public void selectedPhotosChanged() {
if (pickerBottomLayout != null) {
pickerBottomLayout.updateSelectedCount(selectedPhotos.size() + selectedWebPhotos.size(), true);
}
}
@Override
public void actionButtonPressed(boolean canceled) {
removeSelfFromStack();
if (!canceled) {
sendSelectedPhotos();
}
}
@Override
public boolean didSelectVideo(String path) {
removeSelfFromStack();
return delegate.didSelectVideo(path);
}
});
presentFragment(fragment);
}
示例5: PhotoPickerActivity
import org.telegram.messenger.MediaController; //导入方法依赖的package包/类
public PhotoPickerActivity(int type, MediaController.AlbumEntry selectedAlbum, HashMap<Integer, MediaController.PhotoEntry> selectedPhotos, HashMap<String, MediaController.SearchImage> selectedWebPhotos, ArrayList<MediaController.SearchImage> recentImages, boolean onlyOnePhoto, boolean allowCaption, ChatActivity chatActivity) {
super();
this.selectedAlbum = selectedAlbum;
this.selectedPhotos = selectedPhotos;
this.selectedWebPhotos = selectedWebPhotos;
this.type = type;
this.recentImages = recentImages;
this.singlePhoto = onlyOnePhoto;
this.chatActivity = chatActivity;
this.allowCaption = allowCaption;
if (selectedAlbum != null && selectedAlbum.isVideo) {
singlePhoto = true;
}
}
示例6: openPhotoPicker
import org.telegram.messenger.MediaController; //导入方法依赖的package包/类
private void openPhotoPicker(MediaController.AlbumEntry albumEntry, int type) {
ArrayList<MediaController.SearchImage> recentImages = null;
if (albumEntry == null) {
if (type == 0) {
recentImages = recentWebImages;
} else if (type == 1) {
recentImages = recentGifImages;
}
}
PhotoPickerActivity fragment = new PhotoPickerActivity(type, albumEntry, selectedPhotos, selectedWebPhotos, recentImages, singlePhoto, allowCaption, chatActivity);
fragment.setDelegate(new PhotoPickerActivity.PhotoPickerActivityDelegate() {
@Override
public void selectedPhotosChanged() {
if (pickerBottomLayout != null) {
pickerBottomLayout.updateSelectedCount(selectedPhotos.size() + selectedWebPhotos.size(), true);
}
}
@Override
public void actionButtonPressed(boolean canceled) {
removeSelfFromStack();
if (!canceled) {
sendSelectedPhotos();
}
}
@Override
public boolean didSelectVideo(String path) {
removeSelfFromStack();
return delegate.didSelectVideo(path);
}
});
presentFragment(fragment);
}
示例7: didSelectAlbum
import org.telegram.messenger.MediaController; //导入方法依赖的package包/类
void didSelectAlbum(MediaController.AlbumEntry albumEntry);