Customzable TimelineView for Android

Related tags

UI/UX TimelineView
Overview

Customizable Timeline View for Android

Customizable Timeline View for Android, Create a simple timeline list with few lines of code. You can adjust the image, image size, line color, line size, background to the image and the background size.

Download

Add it in your root build.gradle at the end of repositories:

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

Add the dependency:

dependencies {
    compile 'com.github.qapqap:TimelineView:v1.6'
}

Usage

In your activity java class:

// Create Timeline rows List
ArrayList<TimelineRow> timelineRowsList = new ArrayList<>();

// Create new timeline row (Row Id)
TimelineRow myRow = new TimelineRow(0);

// To set the row Date (optional)
myRow.setDate(new Date());
// To set the row Title (optional)
myRow.setTitle("Title");
// To set the row Description (optional)
myRow.setDescription("Description");
// To set the row bitmap image (optional)
myRow.setImage(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher));
// To set row Below Line Color (optional)
myRow.setBellowLineColor(Color.argb(255, 0, 0, 0));
// To set row Below Line Size in dp (optional)
myRow.setBellowLineSize(6);
// To set row Image Size in dp (optional)
myRow.setImageSize(40);
// To set background color of the row image (optional)
myRow.setBackgroundColor(Color.argb(255, 0, 0, 0));
// To set the Background Size of the row image in dp (optional)
myRow.setBackgroundSize(60);
// To set row Date text color (optional)
myRow.setDateColor(Color.argb(255, 0, 0, 0));
// To set row Title text color (optional)
myRow.setTitleColor(Color.argb(255, 0, 0, 0));
// To set row Description text color (optional)
myRow.setDescriptionColor(Color.argb(255, 0, 0, 0));

// Add the new row to the list
timelineRowsList.add(myRow);

// Create the Timeline Adapter
ArrayAdapter<TimelineRow> myAdapter = new TimelineViewAdapter(this, 0, timelineRowsList,
	//if true, list will be sorted by date
	false);

// Get the ListView and Bind it with the Timeline Adapter
ListView myListView = (ListView) findViewById(R.id.timeline_listView);
myListView.setAdapter(myAdapter);

In your activity layout xml

<ListView
    android:id="@+id/timeline_listView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:divider="@null"
    android:dividerHeight="0dp" />

License

Copyright 2016 Abdullah Alsulaiman.

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.
You might also like...
Make your native android Dialog Fancy. A library that takes the standard Android Dialog to the next level with a variety of styling options. Style your dialog from code.
Make your native android Dialog Fancy. A library that takes the standard Android Dialog to the next level with a variety of styling options. Style your dialog from code.

FancyAlertDialog-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ..

Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#

Xamarin.Android Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#. Build Status Platform

A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content.

Swipecards Travis master: A Tinder-like cards effect as of August 2014. You can swipe left or right to like or dislike the content. The library create

Bootstrap style widgets for Android, with Glyph Icons
Bootstrap style widgets for Android, with Glyph Icons

Android-Bootstrap Android Bootstrap is an Android library which provides custom views styled according to the Twitter Bootstrap Specification. This al

[] A fast PDF reader component for Android development
[] A fast PDF reader component for Android development

This project is no longer maintained. You can find a good replacement here, which is a fork relying on Pdfium instead of Vudroid/MuPDF for decoding PD

[] Define and render UI specs on top of your Android UI
[] Define and render UI specs on top of your Android UI

dspec A simple way to define and render UI specs on top of your Android UI. Usage Enclose the target UI with a DesignSpecFrameLayout, usually the root

A Material design Android pincode library. Supports Fingerprint.
A Material design Android pincode library. Supports Fingerprint.

LolliPin A Lollipop material design styled android pincode library (API 14+) To include in your project, add this to your build.gradle file: //Loll

Android Library to implement simple touch/tap/swipe gestures
Android Library to implement simple touch/tap/swipe gestures

SimpleFingerGestures An android library to implement simple 1 or 2 finger gestures easily Example Library The library is inside the libSFG folder Samp

Android layout decorators : Injecting custom attributes in layout files, Using decorators to get rid of unnecessary class explosion with custom views
Android layout decorators : Injecting custom attributes in layout files, Using decorators to get rid of unnecessary class explosion with custom views

Decor Decor is a library that applies decorators to Android layout with additional attributes without the need to extend and create a custom View for

Comments
  • About text color...

    About text color...

    Hi my friend! Thanks to you.... When I'm trying to implement the TimelineView the text color always is white. I only want to ask you... How can I customize the text color of Listview?

    opened by magdy-zon 2
  • Modification in View

    Modification in View

    If i don't want to put date, and want to put dynamic Title and description. How comes will get into it? If i delete the method of date, it showing error. Please fix it soon and modify it.

    Thanks.

    opened by ayush18verma 2
  • Add more TimelineRow constructors

    Add more TimelineRow constructors

    Added two constructors with fewer parameters. I think it is much convenient rather than pass 8-10 arguments. :smile:

    TimelineRow row1 = new TimelineRow(1, new Date());
    row1.setImage(image);
    row1.setImageSize(40);
    row1.setBackgroundColor(0xFF007700);
    
    TimelineRow row2 = new TimelineRow(2, new Date(), "Title", "Description");
    TimelineRow row3 = new TimelineRow(3, new Date(), "Header", "Content");
    
    opened by aNNiMON 1
  • Android plurals.xml, Russian language

    Android plurals.xml, Russian language

    Added:

    • android plurals.xml support (because there're different forms of numeral in different languages)
    • Russian language

    Please, edit plural localization for Arabic.

    opened by Senderman 0
Owner
Abdullah Alsulaiman
Abdullah Alsulaiman
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View

TourGuide TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the exa

Tan Jun Rong 2.6k Jan 5, 2023
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+)

RippleView View that imitates Ripple Effect on click which was introduced in Android L. Usage For a working implementation, Have a look at the Sample

Muthuramakrishnan Viswanathan 1.2k Dec 30, 2022
A new canvas drawing library for Android. Aims to be the Fabric.js for Android. Supports text, images, and hand/stylus drawing input. The library has a website and API docs, check it out

FabricView - A new canvas drawing library for Android. The library was born as part of a project in SD Hacks (www.sdhacks.io) on October 3rd. It is cu

Antwan Gaggi 1k Dec 13, 2022
MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.

About MarkdownView (Markdown For Android) is an Android library that helps you display Markdown text or files (local/remote) as formatted HTML, and st

Feras Alnatsheh 1k Dec 20, 2022
SwipeBack for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swipe gesture

SwipeBack SwipeBack is for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swi

Hannes Dorfmann 697 Dec 14, 2022
A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on Android 2.1+ (Eclair MR1 / level 7).

Android Switch Preference Backport A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on

Benoit Lubek 498 Dec 29, 2022
Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (https://github.com/romannurik/android-wizardpager)

Wizard Pager Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (ht

Julián Suárez 520 Nov 11, 2022
Make your native android Toasts Fancy. A library that takes the standard Android toast to the next level with a variety of styling options. Style your toast from code.

FancyToast-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ... ma

Shashank Singhal 1.2k Dec 26, 2022