use of org.thoughtcrime.securesms.giph.mp4.GiphyMp4ItemDecoration in project Signal-Android by WhisperSystems.
the class ConversationFragment method initializeGiphyMp4.
@NonNull
private GiphyMp4ProjectionRecycler initializeGiphyMp4() {
int maxPlayback = GiphyMp4PlaybackPolicy.maxSimultaneousPlaybackInConversation();
List<GiphyMp4ProjectionPlayerHolder> holders = GiphyMp4ProjectionPlayerHolder.injectVideoViews(requireContext(), getViewLifecycleOwner().getLifecycle(), videoContainer, maxPlayback);
GiphyMp4ProjectionRecycler callback = new GiphyMp4ProjectionRecycler(holders);
GiphyMp4PlaybackController.attach(list, callback, maxPlayback);
list.addItemDecoration(new GiphyMp4ItemDecoration(callback, translationY -> {
reactionsShade.setTranslationY(translationY + list.getHeight());
return Unit.INSTANCE;
}), 0);
return callback;
}
Aggregations