This depends on your specific use case, since these repos serve different purposes:
baseflow/photoview
- Purpose: ImageView with zooming capabilities via touch gestures
- Use when: You need to display and let users zoom/pan images within your app
- Features [README.md:L40-53]: Out-of-box zooming (multi-touch, double-tap), smooth scrolling, works in scrolling parents like ViewPager
- ⚠️ Risk: Last commit 4 years ago (stale project per RepoPilot verdict)
jakewharton/viewpagerindicator
- Purpose: Visual indicator widgets for ViewPager navigation
- Use when: You need to show page indicators (dots, titles, underlines, icons) alongside ViewPager
- Features [README.md:L1-40]: Multiple indicator styles (TitlePageIndicator, CirclePageIndicator, UnderlinePageIndicator, IconPageIndicator), compatible with Support Library
Recommendation
Both, if needed — they complement each other:
- Use viewpagerindicator if you're building a ViewPager-based navigation UI and need visual feedback on which page you're on
- Use photoview if you need zoomable images within those pages
Neither alone is a complete solution. If you're starting fresh:
- For modern projects, consider newer alternatives to ViewPager (like ViewPager2 in androidx)
- PhotoView's staleness (4y) is a concern—vet it for Android version support in your target API
What's your primary goal—image zooming, page navigation, or both?
FOLLOW_UPS:
- Does your app need image zooming specifically?
- Will you use ViewPager or newer navigation patterns?
- What's your minimum Android API level?