aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--library/src/main/kotlin/ca/allanwang/kau/changelog/Changelog.kt2
-rw-r--r--sample/src/main/res/xml/changelog.xml9
2 files changed, 10 insertions, 1 deletions
diff --git a/library/src/main/kotlin/ca/allanwang/kau/changelog/Changelog.kt b/library/src/main/kotlin/ca/allanwang/kau/changelog/Changelog.kt
index d2ea985..ae4c8f9 100644
--- a/library/src/main/kotlin/ca/allanwang/kau/changelog/Changelog.kt
+++ b/library/src/main/kotlin/ca/allanwang/kau/changelog/Changelog.kt
@@ -51,7 +51,7 @@ internal fun parse(context: Context, @XmlRes xmlRes: Int): List<Pair<String, Cha
}
internal enum class ChangelogType(val tag: String, val attr: String, @LayoutRes val layout: Int) {
- TITLE("title", "version", R.layout.kau_changelog_title),
+ TITLE("version", "title", R.layout.kau_changelog_title),
ITEM("item", "text", R.layout.kau_changelog_content);
companion object {
diff --git a/sample/src/main/res/xml/changelog.xml b/sample/src/main/res/xml/changelog.xml
index eb594ca..015171f 100644
--- a/sample/src/main/res/xml/changelog.xml
+++ b/sample/src/main/res/xml/changelog.xml
@@ -6,6 +6,15 @@
<item text="" />
-->
+ <version title="v1.2"/>
+ <item text="Fix title attribute in changelog" />
+ <item text="" />
+ <item text="" />
+ <item text="" />
+ <item text="" />
+ <item text="" />
+ <item text="" />
+
<version title="v1.1"/>
<item text="Created kpref items" />
<item text="Attached source files" />