With MaterialTimelineView you can easily create a material looking timeline.

Overview

MaterialTimelineView Build Status Download Platform License: MIT Android Arsenal

With MaterialTimelineView you can easily create a material looking timeline.

Banner Get it on Google Play

Setup

The library is pushed to jCenter() as an AAR, so you just need to add the following to your build.gradle file:

dependencies {
    implementation 'pl.hypeapp:materialtimelineview:1.1'
}

Usage

MaterialTimelineView extends from ConstraintLayout, so it has all of its possibilities.

A sample of simple recycler view that demonstrates usage of library

In your xml layout add:

<pl.hypeapp.materialtimelineview.MaterialTimelineView
        android:id="@+id/material_timeline_view"
        android:layout_width="match_parent"
        android:layout_height="100dp"
        android:background="@android:color/holo_orange_light"
        app:timeline_top_radio_color="@android:color/white"
        app:timeline_bottom_radio_color="@android:color/white"
        app:timeline_line_color="@android:color/white"
        app:timeline_type="item"
        app:timeline_position="first"                                              
        app:timeline_margin_start="32dp"
        app:timeline_radio_outline_radius="20"
        app:timeline_radio_radius="12">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="HELLO WORLD"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"/>

</pl.hypeapp.materialtimelineview.MaterialTimelineView>      

or programatically:

val materialTimelineView: MaterialTimelineView = findViewById(R.id.material_timeline_view)
materialTimelineView.position = MaterialTimelineView.POSITION_FIRST // Default MaterialTimelineView.POSITION_FIRST
materialTimelineView.timelineType = MaterialTimelineView.TIMELINE_TYPE_ITEM // Default MaterialTimelineView.TIMELINE_TYPE_LINE
materialTimelineView.radioRadius = 14f // Default 12f
materialTimelineView.radioOutlineRadius = 22f // Default 22f
materialTimelineView.radioMarginStart = 100f // Default 150f
materialTimelineView.topRadioColor = Color.Black // Default Color.White
materialTimelineView.bottomRadioColor = Color.Black // Default Color.White
materialTimelineView.lineColor = Color.Black // Default Color.White

Timeline types overview

Attributes Screen
app:timeline_type="item"
app:timeline_position="first"
item first
app:timeline_type="item"
app:timeline_position="middle"
item middle
app:timeline_type="item"
app:timeline_position="last"
item last
app:timeline_type="line"
app:timeline_position="first"
line first
app:timeline_type="line"
app:timeline_position="middle"
line middle
app:timeline_type="line"
app:timeline_position="last"
line last

Apps that use MaterialTimelineView

If you're using this library in your app and you'd like to list it here, Please let me know via email, pull requests or issues.

License

MIT License

Copyright (c) 2017 Przemysław Szymkowiak ([email protected])

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Comments
  • Constants have private access

    Constants have private access

    When trying to programmatically create an item in Java code, some constants like MaterialTimelineView.TIMELINE_TYPE_ITEM are needed to use but Android Studio says TIMELINE_TYPE_ITEM has private access in 'pl.hypeapp.materialtimelineview.MaterialTimelineView'. Is this intended or just a mistake?

    opened by kwon0408 2
  • java sample

    java sample

    Hi there! i know that kotlin will replace java for android apps and stuff, but i still struggling with this language i just want to ask you if, theres a way to have a sample in java?

    opened by jukinhaum 1
  • gradle is deprecating jcenter

    gradle is deprecating jcenter

    jcenter will be a read only repo soon. any plans on pushing the artifact to other repositories?

    https://developer.android.com/studio/build/jcenter-migration

    opened by gelojavonitalla 0
  • Cards with elevation shadow

    Cards with elevation shadow

    Hi there thanks for the library, is there anyway to have card views with elevation without cutting it's bottom shadow off?

    Adding a bottom margin will cause the radio circle of the next divider to have a gap.

    opened by wprenison 0
  • App is crashing

    App is crashing

    Hi, I am trying to use this library but App keeps crashing. I had only included your library in the layout file. There is know extra code which might be wrong. Even I have tried your sample code but app keeps crasing with following error.

    Error inflating class pl.hypeapp.materialtimelineview.MaterialTimelineView

    opened by laxmimerit 13
Owner
Przemek
Android programmer.
Przemek
A react-like kotlin library to create an inventory ui easily in paper plugins

A react-like kotlin library to create an inventory ui easily in paper plugins

R2turnTrue 6 Aug 23, 2022
Arrow Endpoint offers a composable Endpoint datatype, that allows us easily define an Endpoint from which we can derive clients, servers & documentation.

Arrow Endpoint Arrow Endpoint offers a composable Endpoint datatype, that allows us easily define an Endpoint from which we can derive clients, server

ΛRROW 23 Dec 15, 2022
Arrow Endpoint offers a composable Endpoint datatype, that allows us easily define an Endpoint from which we can derive clients, servers & documentation.

Arrow Endpoint Arrow Endpoint offers a composable Endpoint datatype, that allows us easily define an Endpoint from which we can derive clients, server

ΛRROW 8 Oct 11, 2021
Kotlin and Ktor app, which can easily be deployed to Heroku

[ ?? Work in progress ??‍♀️ ⛏ ?? ??️ ?? ?? ?? ] Shoppe Kotlin Multiplatform App Kotlin and Ktor app, which can easily be deployed to Heroku. This appl

Adrian Witaszak 13 Oct 2, 2022
An android application for creating a journal for subjects you studied and also you can set timer for break.

Study Journal An android application for creating a journal for subjects you studied and also you can set timer for break between two consecutive subj

Prasoon 3 Aug 10, 2022
This library is a set of simple wrapper classes that are aimed to help you easily access android device information.

SysInfo Simple, single class wrapper to get device information from an android device. This library provides an easy way to access all the device info

Klejvi Kapaj 7 Dec 27, 2022
A Kotlin Multiplatform and Compose template that allows you to easily set up your project targeting: Android, Desktop, and Web

A Kotlin Multiplatform and Compose template that allows you to easily set up your project targeting: Android, Desktop, and Web

Carlos Mota 3 Oct 27, 2021
Kotlin DALL·E 2 is a new AI system that can create realistic images and art from a description in natural language.

OpenAI Dall•E AI Kotlin Mobile App OpenAI Dall•E Application Build With Kotlin MVVM (Model - View - ViewModel) Clean Architecture, Beautiful Design UI

Murat ÖZTÜRK 15 Jan 1, 2023
👋 A common toolkit (utils) ⚒️ built to help you further reduce Kotlin boilerplate code and improve development efficiency. Do you think 'kotlin-stdlib' or 'android-ktx' is not sweet enough? You need this! 🍭

Toolkit [ ?? Work in progress ⛏ ?? ??️ ?? ] Snapshot version: repositories { maven("https://s01.oss.sonatype.org/content/repositories/snapshots") }

凛 35 Jul 23, 2022
Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager.

Carousel Recyclerview Create carousel effect in recyclerview with the CarouselRecyclerview in a simple way. Including in your project Gradle Add below

Jack and phantom 514 Jan 8, 2023
With Viola android face detection library, you can detect faces in a bitmap, crop faces using predefined algorithm and get additional information from the detected faces.

Viola Viola android face detection library detects faces automatically from a bitmap, crop faces using the predefined algorithms, and provides supplem

Darwin Francis 58 Nov 1, 2022
Arc Layout is a view group with which you can add a arc-shaped container in your layout.

ArcLayout Arc Layout is a view group with which you can add a arc-shaped container in your layout. Two main variables are the direction and the curvat

Ali Rezaiyan 32 Aug 17, 2022
DocuBox is a cloud based file storing app where you can securely store and access your documents from anywhere around the world

DocuBox is an android app ??in which you can securely upload your files on the cloud– from family pictures and audio recordings to spreadsheets, presentations and other confidential documents.

Vaibhav Jaiswal 26 Jan 3, 2023
[Android Library] A SharedPreferences helper library to save and fetch the values easily.

Preference Helper A SharedPreferences helper library to save and fetch the values easily. Featured in Use in your project Add this to your module's bu

Naveen T P 13 Apr 4, 2020
Quick route to developer options page easily

QuickRoute Using Quick Settings Tile to navigate to Developer options page without click a lot of buttons. Preview Install Can install from Google Pla

Jintin 18 Oct 1, 2021
A Gradle plugin to easily publish library components to Maven.

Component Publisher A Gradle plugin to easily publish components based on maven-publish. You can find the latest released plugin on Gradle Plugin Port

Hulk Su 7 Oct 24, 2022
A simple and easy adapter for RecyclerView. You don't have to make adapters and view holders anymore. Slush will help you.

한국어 No more boilerplate adapters and view holders. Slush will make using RecyclerView easy and fast. The goal of this project is to make RecyclerView,

SeungHyun 26 Sep 13, 2022
🛠️ The missing drawable toolbox for Android. Create drawables programmatically and get rid of the boring and always repeated drawable.xml files.

DrawableToolbox English | 中文 The missing DrawableToolbox for Android. Create drawables programmatically and get rid of the boring and always repeated

Hong Duan 1.1k Jan 4, 2023