Open fan90910 opened 5 years ago
Hello, I am trying to fix this problem, have you solved it?
I have found where is the problem, change inside of AlbumAdapter.java:
@Override
public int getItemViewType(int position) {
switch (position) {
case 0: {
if(hasCamera) {
return TYPE_BUTTON;
}
else {
AlbumFile albumFile = mAlbumFiles.get(position);
return albumFile.getMediaType() == AlbumFile.TYPE_VIDEO ? TYPE_VIDEO : TYPE_IMAGE;
}
}
default: {
position = hasCamera ? position - 1 : position;
AlbumFile albumFile = mAlbumFiles.get(position);
return albumFile.getMediaType() == AlbumFile.TYPE_VIDEO ? TYPE_VIDEO : TYPE_IMAGE;
}
}
}
The problem was that the first element return image type.
Album.video(this) .singleChoice() .camera(false) .filterDuration(new Filter() {
@Override
public boolean filter(Long attributes) {
return attributes < 3000;
}
})
.afterFilterVisibility(false)
just like this