GithubHelp home page GithubHelp logo

androidtimeline's Introduction

androidtimeline

Developed by Leonardo Lino

Screenshot of Android Timeline

Timeline library for android

This is still a work in progress so there are bugs.

Usage

See example project to see how to use this timeline library

Step by Step

1- Import timelineandroid into your workspace. Make sure in android properties it's set as a library

2- create a class MyTimecard that extends TimeCard. This forces you to implement a method called getView.

3- Create an xml file (in my example it's called my_timecard)

4- In your main.activity.xml, copy code from example xml

5- In main activity:

LinearLayout tabela = (LinearLayout)findViewById(R.id.tabela);
		LinearLayout tabelaNavbar = (LinearLayout) findViewById(R.id.navbar);
		
		TBuilder tbuild = new TBuilder(getApplicationContext());
		tbuild.setTable(tabela);
		tbuild.setTableNavbar(tabelaNavbar);
		
		Calendar cal = new GregorianCalendar();
		MyTimecard tc1 = new MyTimecard("Example 1");
		tc1.setDate(cal);
		Bitmap bm = getBitmapFromAsset("media_29441.jpg");
		tc1.setImgBitmap(bm);
		
		Calendar cal2 = new GregorianCalendar();
		MyTimecard tc2 = new MyTimecard("New Test");
		cal2.set(Calendar.MONTH, Calendar.MAY);
		cal2.set(Calendar.DAY_OF_MONTH, 17);
		cal2.set(Calendar.YEAR, 2002);
		tc2.setDate(cal2);
		Bitmap bm2 = getBitmapFromAsset("salvador_dali1.jpg");
		tc2.setImgBitmap(bm2);
		
		tbuild.addTimeCard(tc1);
		tbuild.addTimeCard(tc2);
		tbuild.build();
		

androidtimeline's People

Contributors

llino avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.