Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 962 Bytes

README.md

File metadata and controls

11 lines (6 loc) · 962 Bytes

Custom ViewHolders Demo

This demos the changes made to StfalconImageViewer made in this fork.

alt tag

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.