Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vipulasri/Timeline-View
Android Timeline View is used to display views like Tracking of shipment/order, steppers etc.
https://github.com/vipulasri/Timeline-View
android android-timeline recyclerview timeline timelineview ui
Last synced: about 2 months ago
JSON representation
Android Timeline View is used to display views like Tracking of shipment/order, steppers etc.
- Host: GitHub
- URL: https://github.com/vipulasri/Timeline-View
- Owner: vipulasri
- License: apache-2.0
- Created: 2015-12-15T14:55:04.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-07-09T18:24:25.000Z (over 2 years ago)
- Last Synced: 2024-10-16T11:42:21.804Z (about 2 months ago)
- Topics: android, android-timeline, recyclerview, timeline, timelineview, ui
- Language: Kotlin
- Homepage:
- Size: 19.9 MB
- Stars: 3,809
- Watchers: 97
- Forks: 642
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-kotlin - Timeline-View - Android Timeline View is used to display views like Tracking of shipment/order, steppers etc. (Libraries)
- awesome-github-android-ui - Timeline-View - 时间线视图库 (时间轴)
- awesome-list - vipulasri/Timeline-View - Android Timeline View is used to display views like Tracking of shipment/order, steppers etc. (Kotlin)
README
# Timeline-View
Android Timeline View Library (Using RecyclerView) is simple implementation used to display view like Tracking of shipment/order, steppers etc.
### Specs
[![Maven Central](https://img.shields.io/maven-central/v/com.github.vipulasri/timelineview.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.github.vipulasri%22%20AND%20a:%22timelineview%22)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/vipulasri/Timeline-View/blob/master/LICENSE)### Badges/Featured In
[![Timeline View](https://www.appbrain.com/stats/libraries/shield/timeline_view.svg)](https://www.appbrain.com/stats/libraries/details/timeline_view/timeline-view)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Timeline--View-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/2923)
[![AndroidWeekly](https://androidweekly.net/issues/issue-395/badge)](https://androidweekly.net/issues/issue-395)
[![AndroidDev Digest](https://img.shields.io/badge/AndroidDev%20Digest-%23126-blue.svg)](https://www.androiddevdigest.com/digest-126/)![showcase](https://github.com/vipulasri/Timeline-View/blob/master/art/showcase.png)
## Sample Project
For information : checkout [Example Screen Code](https://github.com/vipulasri/Timeline-View/tree/master/app/src/main/java/com/github/vipulasri/timelineview/sample/example) in repository.
### Download
[![TimelineView on Google Play](https://github.com/vipulasri/Timeline-View/blob/master/art/google_play.png)](https://play.google.com/store/apps/details?id=com.github.vipulasri.timelineview.sample)
## Quick Setup
### 1. Include library
**Using Gradle**
``` gradle
dependencies {
implementation 'com.github.vipulasri:timelineview:1.1.5'
}
```### What's New
See the project's Releases page for a list of versions with their change logs.
### [View Releases](https://github.com/vipulasri/Timeline-View/releases)
If you Watch this repository, GitHub will send you an email every time I publish an update.
### 2. Usage
* In XML Layout :``` java
```
##### Line Padding around marker
``` java
```
* Configure using xml attributes or setters in code:
Attribute Name
Default Value
Description
app:marker="@drawable/marker"
Green Colored Oval Drawable
sets marker drawable
app:markerSize="25dp"
25dp
sets marker size
app:markerInCenter="false"
true
sets the marker in center of line if `true`
app:markerPaddingLeft="0dp"
0dp
sets the marker left padding, applicable only with horizontal orientation
app:markerPaddingTop="0dp"
0dp
sets the marker top padding, applicable only with vertical orientation
app:markerPaddingRight="0dp"
0dp
sets the marker right padding, applicable only with horizontal orientation
app:markerPaddingBottom="0dp"
0dp
sets the marker bottom padding, applicable only with vertical orientation
app:startLineColor="@color/primarColor"
Dark Grey Line
sets start line color
app:endLineColor="@color/primarColor"
Dark Grey Line
sets end line color
app:lineWidth="2dp"
2dp
sets line width
app:lineOrientation="horizontal"
vertical
sets orientation of line ie `horizontal` or `vertical`
app:linePadding="5dp"
0dp
sets line padding around marker
app:lineStyle="dash"
normal
sets line style ie `normal` or `dashed`
app:lineStyleDashGap="4dp"
4dp
sets line dash gap
app:lineStyleDashLength="8dp"
8dp
sets line dash length
* RecyclerView Holder :
Your `RecyclerViewHolder` should have an extra parameter in constructor i.e viewType from `onCreateViewHolder`. You would also have to call the method `initLine(viewType)` in constructor definition.
``` javapublic class TimeLineViewHolder extends RecyclerView.ViewHolder {
public TimelineView mTimelineView;public TimeLineViewHolder(View itemView, int viewType) {
super(itemView);
mTimelineView = (TimelineView) itemView.findViewById(R.id.timeline);
mTimelineView.initLine(viewType);
}
}```
* RecyclerView Adapter :
override `getItemViewType` method in Adapter
``` java@Override
public int getItemViewType(int position) {
return TimelineView.getTimeLineViewType(position, getItemCount());
}```
And pass the `viewType` from `onCreateViewHolder` to its Holder.
``` java@Override
public TimeLineViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = View.inflate(parent.getContext(), R.layout.item_timeline, null);
return new TimeLineViewHolder(view, viewType);
}```
## Apps that use this library
* [ALL IPO News](https://play.google.com/store/apps/details?id=com.appbootup.ipo.news)
If you're using this library in your app and you'd like to list it here,
Please let me know via [email](mailto:[email protected]), [pull requests](https://github.com/vipulasri/Timeline-View/pulls) or [issues](https://github.com/vipulasri/Timeline-View/issues).[Apps using Timeline-View, via AppBrain Stats](https://www.appbrain.com/stats/libraries/details/timeline_view/timeline-view)
## License
Copyright 2018 Vipul Asri
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 athttp://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.