There are many ways you can customize the changelog view.
Library uses res/layout/changelogrowheader_layout.xml
XML layout for each header.
You can use your own xml layout with chg:rowHeaderLayoutId
attribute in ChangeLogListView
element.
<!-- Custom xml file Example and custom header layout -->
<view xmlns:android="https://schemas.android.com/apk/res/android"
xmlns:chg="https://schemas.android.com/apk/res-auto"
class="it.gmariotti.changelibs.library.view.ChangeLogListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
chg:rowHeaderLayoutId="@layout/demo_changelogrowheader_layout"
/>
The quickest way to start with this would be to copy the changelogrowheader_layout.xml
layout resource file from this project into your own and modify its contents.
There's a specific set of views you need to have in your layout:
- A
TextView
with the IDchg_headerVersion
that display the Version Number - A
TextView
with the IDchg_headerDate
that display the Version Date
You can find an example in demo_changelogrowheader_layout.xml
Library uses res/layout/changelogrow_layout.xml
XML layout for each row.
You can use your own xml layout with chg:rowLayoutId
attribute in ChangeLogListView
element.
<!-- Custom xml file Example and custom header layout -->
<view xmlns:android="https://schemas.android.com/apk/res/android"
xmlns:chg="https://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="it.gmariotti.changelibs.library.view.ChangeLogListView"
chg:rowLayoutId="@layout/demo_changelogrow_layout"
/>
The quickest way to start with this would be to copy the changelogrow_layout.xml
layout resource file from this project into your own and modify its contents.
There's a specific set of views you need to have in your layout:
- A
TextView
with the IDchg_textbullet
that display the bullet point - A
TextView
with the IDchg_text
that display the actual text that will be displayed as a change in your List
You can find an example in demo_changelogrow_layout.xml
Library uses res/raw/changelog.xml
.
You can use your own file with chg:changeLogFileResourceId
attribute in ChangeLogListView
element.
<!-- Custom xml file Example and custom header layout -->
<view xmlns:android="https://schemas.android.com/apk/res/android"
xmlns:chg="https://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="it.gmariotti.changelibs.library.view.ChangeLogListView"
chg:changeLogFileResourceId="@raw/custom_changelog"
/>
You can find an example in demo_changelogrow_fragment_customlayout.xml
The quickest way to customize this character is to specify this resource in your strings.xml
.
<string name="changelog_row_bulletpoint">\u2022"</string>
If you don't want a bullet list you can specify it in changelog.xml
file with bulletedList="false"
attribute.
<?xml version="1.0" encoding="utf-8"?>
<changelog bulletedList="false">
.....
</changelog>
You can use some html text markup as bold and italic in your changelog.xml
<changelogversion versionName="0.9" changeDate="Aug 11,2013">
<changelogtext>[b]New![/b] Add new attrs to customize header and row layout</changelogtext>
<changelogtext>Fixed log while [i]parsing[/i] </changelogtext>
<changelogtext>performance <b>improvement</b></changelogtext>
....
You can use:
[b] text [/b]
for a bold style, or<b> text </b>
[i] text [/i]
for an italic style, or<b> text </i>
You can customize Version
String in header.
The quickest way to customize this character is to specify this resource in your strings.xml
.
<string name="changelog_header_version">"Revision "</string>
Use string with quotes if you want a space.
For more detailed information and examples you can read this document: