当前位置: 首页>>代码示例>>Java>>正文


Java MediaController.AlbumEntry方法代码示例

本文整理汇总了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()]);
                }
            }
        });
    }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:20,代码来源:PhotoPickerAlbumsCell.java

示例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);
    }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:23,代码来源:PhotoPickerAlbumsCell.java

示例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;
    }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:14,代码来源:PhotoPickerActivity.java

示例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);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:35,代码来源:PhotoAlbumPickerActivity.java

示例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;
    }
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:15,代码来源:PhotoPickerActivity.java

示例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);
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:35,代码来源:PhotoAlbumPickerActivity.java

示例7: didSelectAlbum

import org.telegram.messenger.MediaController; //导入方法依赖的package包/类
void didSelectAlbum(MediaController.AlbumEntry albumEntry); 
开发者ID:MLNO,项目名称:airgram,代码行数:2,代码来源:PhotoPickerAlbumsCell.java


注:本文中的org.telegram.messenger.MediaController.AlbumEntry方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。