Android view for timeline purpose. Ideally made for bank statement or sequential data, for example.
For a working implementation, please take a look at the sample
- Include library
// project/build.gradle
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
// app/build.gradle
dependencies {
implementation "com.github.anacoimbrag:timeline-view:$latest_version"
}
It is very easy to use this lib, you just need to add <Timeline>
tag in your XML layout or instantiate in your code using the default constructor Timeline(context)
.
<com.anacoimbra.android.timeline.Timeline
android:layout_width="wrap_content"
android:layout_height="100dp"
app:bulletIcon="@drawable/ic_expense"
app:bulletType="round"
app:linePadding="4dp" />
BulletType
Code | XML | |
---|---|---|
BulletType.ICON |
icon |
|
BulletType.SQUARE |
square |
|
BulletType.CIRCLE |
circle |
|
BulletType.ROUND |
round |
BulletGravity
Code | XML | |
---|---|---|
BulletGravity.TOP |
top |
|
BulletGravity.CENTER |
center |
|
BulletGravity.BOTTOM |
bottom |
LineType
Code | XML | |
---|---|---|
LineType.SOLID |
solid |
|
LineType.DASHED |
dashed |
|
LineType.DOTTED |
dotted |
LineVisibility
Code | XML | |
---|---|---|
LineVisibility.BOTH |
both |
|
LineVisibility.TOP |
top |
|
LineVisibility.BOTTOM |
bottom |
|
LineVisibility.NONE |
none |
1 • Only works with BulletType round
2 • Only works with LineType dashed
3 • Only works with LineType dashed
or dotted