Search in sources :

Example 6 with SharedDocumentCell

use of org.telegram.ui.Cells.SharedDocumentCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class PhotoPickerActivity method onListItemClick.

private void onListItemClick(View view, Object item) {
    boolean add;
    if (addToSelectedPhotos(item, -1) == -1) {
        add = true;
    } else {
        add = false;
    }
    if (view instanceof SharedDocumentCell) {
        Integer index = (Integer) view.getTag();
        MediaController.PhotoEntry photoEntry = selectedAlbum.photos.get(index);
        SharedDocumentCell cell = (SharedDocumentCell) view;
        cell.setChecked(selectedPhotosOrder.contains(photoEntry.imageId), true);
    }
    updatePhotosButton(add ? 1 : 2);
    delegate.selectedPhotosChanged();
}
Also used : MediaController(org.telegram.messenger.MediaController) SharedDocumentCell(org.telegram.ui.Cells.SharedDocumentCell)

Aggregations

SharedDocumentCell (org.telegram.ui.Cells.SharedDocumentCell)6 Paint (android.graphics.Paint)4 SharedAudioCell (org.telegram.ui.Cells.SharedAudioCell)4 View (android.view.View)3 ImageView (android.widget.ImageView)3 TextView (android.widget.TextView)3 RecyclerView (androidx.recyclerview.widget.RecyclerView)3 ArrayList (java.util.ArrayList)3 SharedLinkCell (org.telegram.ui.Cells.SharedLinkCell)3 SharedPhotoVideoCell2 (org.telegram.ui.Cells.SharedPhotoVideoCell2)3 MediaController (org.telegram.messenger.MediaController)2 MessageObject (org.telegram.messenger.MessageObject)2 TLRPC (org.telegram.tgnet.TLRPC)2 ContextLinkCell (org.telegram.ui.Cells.ContextLinkCell)2 SharedPhotoVideoCell (org.telegram.ui.Cells.SharedPhotoVideoCell)2 Animator (android.animation.Animator)1 AnimatorSet (android.animation.AnimatorSet)1 ObjectAnimator (android.animation.ObjectAnimator)1 ValueAnimator (android.animation.ValueAnimator)1 SuppressLint (android.annotation.SuppressLint)1