android Sticky-TimeLineView that made with jetpack-compose.
implementation "io.github.jisungbin:timelineview:${version}"
data class Item(override val key: Int) : TimeLineItem<Int>
model class must be extends TimeLineView<K>
!
K
value will be TimeLineView-Header
item.
@Composable
fun <K, E : TimeLineItem<K>> TimeLine(
items: List<E>,
modifier: Modifier = Modifier,
timeLineOption: TimeLineOption = TimeLineOption(),
timeLinePadding: TimeLinePadding = TimeLinePadding(),
header: @Composable (K) -> Unit,
content: @Composable (E) -> Unit
)
fun TimeLineOption(
@DrawableRes circleIcon: Int = R.drawable.ic_outline_circle_24,
circleSize: Dp = Dp.Unspecified,
circleColor: Color = Color.Gray,
lineColor: Color = Color(0xFF6200EE),
lineWidth: Dp = 2.dp,
contentHeight: Dp = 100.dp
): TimeLineOption
fun TimeLinePadding(
defaultPadding: PaddingValues = PaddingValues(16.dp),
contentStart: Dp = 4.dp,
circleLineGap: Dp = 1.dp
): TimeLinePadding
TimeLineView
license is under the MIT License.
Please see license file.