All Projects → lriccardo → TimelineView

lriccardo / TimelineView

Licence: Apache-2.0 license
A customizable and easy-to-use Timeline View library for Android. Works as a RecyclerView decorator (ItemDecoration)

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to TimelineView

Timeline View
Android Timeline View is used to display views like Tracking of shipment/order, steppers etc.
Stars: ✭ 3,553 (+2002.37%)
Mutual labels:  timeline, recyclerview, timelineview
Timeline
瀑布流式的时间轴
Stars: ✭ 2,028 (+1100%)
Mutual labels:  timeline, recyclerview, itemdecoration
ItemDecorations
A dividers library for RecyclerView which use GridLayoutManager or LinearLayoutManager,when the RecyclerView used GridLayoutManager that supports Cross-Column feature.一款RecyclerView的分割线库,支持LinearLayoutManager和GridLayoutManager,当使用GridLayoutManager时支持跨行特性
Stars: ✭ 42 (-75.15%)
Mutual labels:  recyclerview, itemdecoration, recyclerview-item-decoration
Candyview
Implement any RecyclerView in just 1 Line. CandyView handles everything for you.
Stars: ✭ 15 (-91.12%)
Mutual labels:  view, recyclerview
Recyclerview Fastscroller
A fully customizable Fast Scroller for the RecyclerView in Android, written in Kotlin
Stars: ✭ 585 (+246.15%)
Mutual labels:  view, recyclerview
Discretescrollview
A scrollable list of items that centers the current element and provides easy-to-use APIs for cool item animations.
Stars: ✭ 5,533 (+3173.96%)
Mutual labels:  view, recyclerview
FancyAdapters
A collection of customizable RecyclerView Adapters for Android, that provide various functionality like item selection, contextual action mode controls, drag&drop and swiping, among other.
Stars: ✭ 49 (-71.01%)
Mutual labels:  recyclerview, recyclerview-item-decoration
Snappyrecyclerview
An extension to RecyclerView which will snap to child Views to the specified anchor, START, CENTER or END.
Stars: ✭ 178 (+5.33%)
Mutual labels:  view, recyclerview
Inifiniterecyclerview
Library for implementing endless loading list easily in Android applications
Stars: ✭ 79 (-53.25%)
Mutual labels:  view, recyclerview
Shimmer Recyclerview X
🌀 ShimmerRecyclerViewX for AndroidX
Stars: ✭ 193 (+14.2%)
Mutual labels:  view, recyclerview
Materialtimelineview
With MaterialTimelineView you can easily create a material looking timeline.
Stars: ✭ 443 (+162.13%)
Mutual labels:  timeline, view
SpacingItemDecoration
ItemDecoration for RecyclerView that allows you to set spacing between and around list items in flexible way.
Stars: ✭ 83 (-50.89%)
Mutual labels:  recyclerview, itemdecoration
SlideTable
可以滑动 以表格形式展示数据
Stars: ✭ 14 (-91.72%)
Mutual labels:  view, recyclerview
recycler-adapter
RecyclerView-driven declarative UIs
Stars: ✭ 124 (-26.63%)
Mutual labels:  view, recyclerview
Windowimageview
An ImageView display in RecyclerView, looks like window.
Stars: ✭ 699 (+313.61%)
Mutual labels:  view, recyclerview
FlexItemDecoration
FlexItemDecoration, can customize the head, bottom, leftmost, rightmost dividing line, but also customize any one of the dividing lines and batch custom multiple dividing lines
Stars: ✭ 52 (-69.23%)
Mutual labels:  recyclerview, itemdecoration
Imagezoom
An Android library that makes any view to be zoomable.
Stars: ✭ 118 (-30.18%)
Mutual labels:  view, recyclerview
StickyHeader
A simple lightweight sticky header ItemDecorator for RecyclerView
Stars: ✭ 108 (-36.09%)
Mutual labels:  recyclerview, itemdecoration
InfiniteScrollRecyclerView
Enables the RecyclerView to Auto scroll for indefinite time.
Stars: ✭ 49 (-71.01%)
Mutual labels:  recyclerview, recyclerview-item-decoration
VideoTimelineView
Video timeline UI for iOS Apps
Stars: ✭ 103 (-39.05%)
Mutual labels:  timeline, view

TimelineView

API

Android Arsenal AndroidWeekly

A customizable and easy-to-use Timeline View library for Android

Can be used as a standalone view or as a RecyclerView decorator

header

Previews

Automatically adapts to the item height and supports expand animations View type Preview View type Preview View type Preview
demo first first middle middle checked checked
last last spacer spacer dashed dashed

Setup

1. Add Jitpack to your root build.gradle

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

2. Add the dependency

dependencies {
    implementation 'com.github.lriccardo:TimelineView:1.1.2'
}

Usage

RecyclerView Decorator

recyclerView.addItemDecoration(
    TimelineDecorator(
        indicatorSize = 24f,
        lineWidth = 15f,
        padding = 48f,
        position = TimelineDecorator.Position.Left,
        indicatorColor = Color.RED,
        lineColor = Color.RED
    )
)
  • Customization

    You can provide a custom drawable for the indicators using indicatorDrawable or indicatorDrawableRes (indicatorDrawable overrides indicatorDrawableRes), if both are null a circle will be drawn (using the other customization parameters).

    If you pass a drawable reference (indicatorDrawableRes), ContextCompat.getDrawable() will be used internally.

    Field Accepted values Default
    indicatorStyle IndicatorStyle (Filled | Empty | Checked) Filled
    indicatorDrawable Drawable null
    indicatorDrawableRes @DrawableRes Int null
    indicatorSize Float 24f
    indicatorYPosition Percentage (0.0f - 1.0f) 0.5f
    checkedIndicatorSize Float TimelineView default value
    checkedIndicatorStrokeWidth Float 4dp
    lineStyle Normal (Normal | Dashed) TimelineView default value
    linePadding Float TimelineView default value
    lineDashLength Float TimelineView default value
    lineDashGap Float TimelineView default value
    lineWidth Float TimelineView default value
    padding Float 16dp
    position Position (Left | Right) Left
    indicatorColor @ColorInt TimelineView default value
    lineColor @ColorInt TimelineView default value
  • Advanced customization

    If your RecyclerView.Adapter implements TimelineAdapter you can customize how each item of your list is drawn. Implementing one or more of these methods, allows you to use the position argument to return a different customization for some of your items.

    interface TimelineAdapter {
        fun getTimelineViewType(position: Int): TimelineView.ViewType?
        fun getIndicatorDrawable(position: Int): Drawable?
        @DrawableRes fun getIndicatorDrawableRes(position: Int): Int?
        fun getIndicatorStyle(position: Int): TimelineView.IndicatorStyle?
        fun getIndicatorColor(position: Int): Int?
        fun getLineColor(position: Int): Int?
        fun getLineStyle(position: Int): TimelineView.LineStyle?
        fun getLinePadding(position: Int): Float?
    }

Standalone view

<com.lriccardo.timelineview.TimelineView
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    app:timeline_item_type="first"
    app:indicator_size="12dp"
    app:line_width="8dp"
    app:indicator_color="@color/teal_700"
    app:line_color="@color/teal_700" />
  • Customization

    Attribute Accepted values Default
    app:timeline_item_type first | middle | last | spacer first
    app:indicator_style filled | empty | checked filled
    app:indicator_drawable Drawable null
    app:indicator_size Dimension 12dp
    app:indicator_color Color Color.RED
    app:indicator_y_position Percentage (0.0 - 1.0) 0.5f
    app:checked_indicator_size Dimension 6dp
    app:checked_indicator_stroke_width Dimension 4dp
    app:line_style normal | dashed normal
    app:line_width Dimension 8dp
    app:line_color Color Color.RED
    app:line_dash_length Dimension 18
    app:line_dash_gap Dimension 12

License

Copyright 2022 Riccardo Lattarulo

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].