How bitvale/pacbutton works
PacButton is an Android UI library for a configurable video/photo switch animation. An app places the custom view in its layout, supplies icons and colors, then responds to selection and animation-progress callbacks. The repository also contains bitmap-conversion and drawable/interpolation helpers; the main view implementation was not excerpted, so links to those helpers are omitted rather than inferred.
Main entry points: PacButton.kt PacButton View
Components 5
Switch View
- PacButton View
library/src/main/java/com/bitvale/pacbutton/PacButton.kt - View Attributes
library/src/main/res/values/attrs.xml
Rendering Helpers
- Bitmap Conversion
library/src/main/java/com/bitvale/pacbutton/BitmapUtil.kt - Drawable and Lerp
library/src/main/java/com/bitvale/pacbutton/Extensions.kt
Other components
- Host App
Connections 3
- Host App → PacButton View: configures and embeds
README.md - Host App → PacButton View: registers callbacks
README.md - PacButton View → Host App: emits selection and progress
README.md