This demos the changes made to StfalconImageViewer
made in this fork.
This app uses a custom ViewHolder
to support videos as well as images and to overlay text on the scrolling ViewPager
pages.
The CustomViewHolder
ensures there is an ImageView
and a VideoView
for every page, and chooses at binding time which View
to show. Both of these views are in a FrameLayout
along with a TextView
, which provides the text overlay.
A custom ViewHolderLoader
(just a method reference, CustomViewHolder::buildViewHolder
) is passed to the modified StfalconImageViewer
to ensure CustomViewHolder
is used.