Changelog
This is a simple builder based changelog library that shows a changelog in a RecyclerView
, a RecyclerView
dialog or a RecyclerView
activity with following features:
Features
- filtering
- based on a min version (useful for app start to only show new changelog entries)
- based on a custom filter string (useful for filtering changelog based on build flavour)
- builder supports any in layout
RecyclerView
or provides a ready to useDialog
orActivity
- also supports automatic handling of showing changelogs on app start (uses preference to save last seen changelog version and handles everything for you automatically to only show new changelogs and only show those once)
- shows loading progress in
Dialog
orActivity
while parsing changelog - customise look
- optional bullet lists
- custom and automatic version names (e.g. version 100 will be formatted as "v1.00" by default if no custom version name is provided)
- fully customised layouts via a custom renderer
- custom xml tags + custom rendering of them
- automatic and custom sorting
Examples - activity, dialog, automatically sorted activity, custom layout
Gradle (via JitPack.io)
- add jitpack to your project's
build.gradle
:
- add the compile statement to your module's
build.gradle
:
Demo
Just check out the demo activity, it will show the base usage of the builder and it's settings.
Simple usage example
You must add a changelog.xml
to your xml resource file. Then you can use it like following:
Example changelog.xml
Advanced usage
Custom layouts
Simply provide custom a custom renderer (very simply interface), derive it from the default ChangelogRenderer
to only adjust small things.
Have a look at following classes to see how this works:
- default renderer: ChangelogRenderer.java
- example custom renderer: ExampleCustomRenderer.java
Custom tags
- create a custom tag class that implements IChangelogTag.java
- register this class like
ChangelogSetup.get().registerTag(...)
- optionally unregister all 3 default tags before adding custom tags if don't want to use them:
ChangelogSetup.get().clearTags()
Custom sorting
- create a custom tag class that implements IChangelogSorter.java or use the integrated sorter that sorts by importance (new > info > bugfix > custom)
- add it to the builder like following: