{"id":21006278,"url":"https://github.com/derlin/android-changelog","last_synced_at":"2025-10-08T04:55:37.749Z","repository":{"id":151663827,"uuid":"121272039","full_name":"derlin/android-changelog","owner":"derlin","description":"Changelog Dialog library for Android (Kotlin)","archived":false,"fork":false,"pushed_at":"2021-06-05T16:10:51.000Z","size":158,"stargazers_count":6,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T02:06:19.028Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derlin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-12T16:33:09.000Z","updated_at":"2024-06-22T02:43:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"e40c5266-c3f0-4d60-8bbb-d9bd4e9fa9a3","html_url":"https://github.com/derlin/android-changelog","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derlin%2Fandroid-changelog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derlin%2Fandroid-changelog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derlin%2Fandroid-changelog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derlin%2Fandroid-changelog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derlin","download_url":"https://codeload.github.com/derlin/android-changelog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254256764,"owners_count":22040354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T08:50:29.508Z","updated_at":"2025-10-08T04:55:32.691Z","avatar_url":"https://github.com/derlin.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Changelog Library for Android\n\nTable of contents\n\n* [Introduction blabla](#introduction-blabla)\n  + [What ?](#what)\n  + [Why ?](#why)\n  + [Overview](#overview)\n  + [Features](#features)\n  + [Samples](#samples)\n* [Getting started](#getting-started)\n  + [Include the library](#include-the-library)\n  + [Configure the dialog style](#configure-the-dialog-style)\n  + [Write the changelog](#write-the-changelog)\n  + [Display the dialog](#display-the-dialog)\n* [Customisation](#customisation)\n  + [Change the dialog title](#change-the-dialog-title)\n  + [Choose what release to show](#choose-what-release-to-show)\n  + [Define your own styles](#define-your-own-styles)\n* [Acknowledgments](#acknowledgments)\n\n## Introduction blabla \n\n###  What\n\nA simple and lightweight library written in Kotlin to show ?beautiful? _changelog_ and _what's new_ dialogs.\n\nThe changelog information is written in a simple xml file under `res/xml`.\n\n### Why\n\nI wanted a simple dialog to show my users after an app update. So as usual, I began browsing Github and other platforms for a nice library. I found some, for example [https://github.com/MartinvanZ/Inscription](https://github.com/MartinvanZ/Inscription).\n\nThe problem ? They all use __WebViews__, meaning that if you want your dialog to match your application theme, you would need to mimic it using CSS (and maintain it in case you change your mind on the colours or other stuffs, which I constantly do). I find CSS quite boring, so I decided to code my own library using only pure Android Views.\n\n### Overview\n\n\n![overview](https://docs.google.com/drawings/d/e/2PACX-1vQ5SGULmPAaOKT0z2KndudYsIg5JZMZYAeLH4ngAo2rUW6jhFxzd6TeNLNVxLJ3mfDURCdzE2ofsd1-/pub?h=1024)\n\n### Features\n\n* Changelog written in a simple xml format\n* Choose which release(s) notes to show\n* Lightweight and easy to use\n* Flexible title and behavior\n* Uses the AppCompat theme by default (primary and accent colors)\n* Completely customizable using styles\n\n### Samples\n\nA sample app is available under `samples`. Feel free to clone and test it.\n\n## Getting started\n\n### Include the library\n\nThis library is hosted on GitHub packages. \n\nGitHub packages currently require a GitHub token... \nFrom within your GitHub account, Settings -\u003e Developer Settings -\u003e Personal Access Tokens -\u003e Generate new token.\nEnsure the token has the scope `read:packages`, copy it and create a file `github.properties` at the root of your project,\nwith the following content:\n````properties\ngpr.usr=YOUR_GITHUB_USERNAME\ngpr.key=YOUR_PERSONAL_ACCESS_TOKEN\n````\nDon't forget to add `github.propoerties` to your `.gitignore`.\n\n\nNow, add the maven repository in your module's `build.gradle`:\n\n```groovy\n// github tokens for access to Github Packages\ndef githubProperties = new Properties()\ngithubProperties.load(new FileInputStream(rootProject.file(\"github.properties\")))\n\nrepositories {\n    /* ... other ... */\n    maven { \n        name = \"GitHubPackages\"\n        url = uri(\"https://maven.pkg.github.com/derlin/android-changelog\")\n\n        credentials {\n            username = githubProperties['gpr.usr'] ?: System.getenv(\"GPR_USER\")\n            password = githubProperties['gpr.key'] ?: System.getenv(\"GPR_API_KEY\")\n        }\n    }\n}\n```\n\nAdd the dependency (change version if needed):\n```groovy\ndependencies {\n    /* ... */\n    implementation 'ch.derlin.android:changelog:1.1@aar'\n}\n```\n### Configure the dialog style\n\n___! Important__ Don't skip this step, or you will run into exceptions at runtime._\n\nIn your `styles.xml`, configure the changelog style by setting the `changelogStyle` attribute in your `AppTheme`. A default style is available, called `LibChangelog`:\n\n```xml\n\u003c!-- res/values/in styles.xml --\u003e\n\n\u003c!-- Your base application theme. --\u003e\n\u003cstyle name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\"\u003e\n    \u003c!-- ... other configurations ... --\u003e \n    \n    \u003c!-- Apply style for changelog --\u003e\n    \u003citem name=\"changelogStyle\"\u003e@style/LibChangelog\u003c/item\u003e\n\u003c/style\u003e\n```\n\n\n### Write the changelog\n\nCreate an xml file in `res/xml`, for example `changelog.xml`. The format is rather simple, so an example should be worth a thousand words:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cchangelog\u003e\n   \u003crelease version=\"1.2\" versioncode=\"3\" summary=\"I don't remember what this release is about... But I can assure you the update is worth it.\" date=\"2018-05-30\"\u003e\n        \u003cchange\u003eFix bugs introduced in version 1.1\u003c/change\u003e\n        \u003cchange\u003e...\u003c/change\u003e\n    \u003c/release\u003e\n    \u003crelease version=\"1.1\" versioncode=\"2\" date=\"2018-05-30\"\u003e\n        \u003cchange\u003eFix the leaking of private information to NSA\u003c/change\u003e\n        \u003cchange\u003eChange colors\u003c/change\u003e\n        \u003cchange\u003eIntroduce new bugs\u003c/change\u003e\n    \u003c/release\u003e\n    \u003crelease version=\"1.0\" versioncode=\"1\" summary=\"Made it !\" date=\"2018-02-18\"\u003e\n        \u003cchange\u003eFirst commit\u003c/change\u003e\n    \u003c/release\u003e\n\u003c/changelog\u003e\n```\n\nNote that:\n\n* the date is in ISO format: `YYYY-MM-dd`\n* the `versionName` and `versionCode` are mandatory and should match the versions stated in `build.gradle`\n* `date` and `summary` are optional\n\n### Display the dialog\n\nTo create and show the dialog from an activity, just call `Changelog.createDialog`. Don't forget to call `show` !\n\n```kotlin\nChangelog.createDialog(this).show()\n```\n\n__listener__: if you want to get notified when the dialog is dismissed, add an `onDismissListener` to the dialog before calling `shhow`. \n\n__versions__: in case you want to show only the latest version's changelog, you can use the extension method `getAppVersion`, which returns a `Pair\u003cversionCode, versionName\u003e`.\n\n```kotlin\nimport ch.derlin.changelog.Changelog\nimport ch.derlin.changelog.Changelog.getAppVersion\n\n// ...\n\nval version = getAppVersion()\nval dialog = Changelog.createDialog(this, versionCode = version.first)\ndialog.setOnDismissListener({_ -\u003e doStuffOnDismiss() })\ndialog.show()\n```\n\n## Customisation\n\n### Change the dialog title\n\nBy default, the dialog title is `@string/changelog_title`. You can either override it in `res/values/strings.xml` or pass a string to the `createDialog` method.\n\n### Choose what release to show\n\nBy default, the dialog will show the whole changelog. You can specify the `versionCode` argument in order to display only releases with a `versionCode` __equal or greater__.\n\nAs stated above, you can use the `getAppVersion` extension method to get the current `versionCode`.\n\n### Define your own styles \n\nThe dialog is made of three parts:\n\n- the dialog view itself (`LinearLayout` with a title and a `RecyclerView`)\n- the header entries: contains a title, a date and a summary\n- the cell entries: contains a bullet and a text\n\nEverything is completely customizable using only styles !\n\nTo begin customizing the dialog, create a `style` inheriting from `LibChangelog` and set the `changelogStyle` attribute to refer to it instead.\n\nIn you custom `changelogStyle`, you can modify any style reference (see `res/values/attrs.xml` for a complete list). __Important__: when you override a style, don't forget to specify the parent (`LibChangelog.STYLE`).\n\nAn example is worth a thousand words. To make the screenshot on the right in the overview section, here is the code:\n\n```xml\n\u003cstyle name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\"\u003e\n    \u003c!-- Apply style for changelog. \n     Just ensure that the style inherits from LibChangelog --\u003e\n    \u003citem name=\"changelogStyle\"\u003e@style/MyChangelog\u003c/item\u003e\n\u003c/style\u003e\n\n\u003cstyle name=\"MyChangelog\" parent=\"LibChangelog\"\u003e\n    \u003c!-- here is the magic --\u003e\n    \u003c!-- just override the title and bullet styles --\u003e\n    \u003citem name=\"changelogTitleStyle\"\u003e@style/MyChangelogHeader\u003c/item\u003e\n    \u003citem name=\"changelogBulletStyle\"\u003e@style/MyChangelogBullet\u003c/item\u003e\n\u003c/style\u003e\n\n\u003cstyle name=\"MyChangelogHeader\" parent=\"LibChangelog.HeaderTitle\"\u003e\n    \u003c!-- override the changelog title: change the color and specify a background image --\u003e\n    \u003citem name=\"android:background\"\u003e@mipmap/parallax_changelog\u003c/item\u003e\n    \u003citem name=\"android:textColor\"\u003e?android:windowBackground\u003c/item\u003e\n    \u003citem name=\"android:gravity\"\u003ebottom\u003c/item\u003e\n    \u003citem name=\"android:paddingLeft\"\u003e10dp\u003c/item\u003e\n    \u003citem name=\"android:paddingBottom\"\u003e20dp\u003c/item\u003e\n\u003c/style\u003e\n\n\u003cstyle name=\"MyChangelogBullet\" parent=\"LibChangelog.CellBullet\"\u003e\n    \u003c!-- change the bullets to use some other drawable resource\n     add margin to make it better looking --\u003e\n    \u003citem name=\"android:background\"\u003e@drawable/logo\u003c/item\u003e\n    \u003citem name=\"android:layout_marginEnd\"\u003e10dp\u003c/item\u003e\n\u003c/style\u003e\n```\n\nDone !\n\n## Acknowledgments\n\nThis library has been motivated by the following project (from whom I reused the xml structure):\n\n* [Inscription](https://github.com/MartinvanZ/Inscription/) by [Martin van Zuilekom](https://github.com/MartinvanZ/)\n\n\n© Copyright 2018 Lucy Linder\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderlin%2Fandroid-changelog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderlin%2Fandroid-changelog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderlin%2Fandroid-changelog/lists"}