Android Timeline is a custom view created to showcase the images against the time photo was taken.
This custom view enables you to simply create a beautiful looking timeline by just including this custom view in your XML file.
<dependency> <groupId>com.tusharchoudhary</groupId> <artifactId>timeline</artifactId> <version>1.2.2</version> </dependency>
Simply include Timeline in your XML file as :
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".TimelineSampleActivity"> <com.tusharchoudhary.timeline.Timeline android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/timeline_main_view" /> </LinearLayout>
And simply bind view with data by calling bindView method from your activity / fragment :
Timeline timelineView = (Timeline) findViewById(R.id.timeline_main_view); List<TimelineView.TimelineDataItem> list = new ArrayList<>(); addDummy(list); timelineView.bindView(list,timelineView);
The TimelineDataItem takes in Long epochTime and String urlToDownload.
Run your app to find the timeline.
Tushar Choudhary - firstname.lastname@example.org
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Copyright 2016 Tushar Choudhary
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
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.