GreenDroid is a development library for the Android platform. It makes UI developments easier and consistent through your applications. A complete description is given on my personal blog.
This is still a work in progress but there are thousands of things to do and I hope I'll have enough time to develop all of the features I have in mind :)
Feel free to contact me for any question related to GreenDroid: bug report, questions about the library, etc. I don't have time to provide personal support but I'll try to look at bug reports and important talks about the GreenDroid philosophy.
Using GreenDroid in your projects
Note : The previous
greendroid.py method has been removed from the library. Indeed, this Python script was perfectly functional but wasn't user-friendly (especially for Windows users)
In order to use GreenDroid you have to do the following steps:
Download the GreenDroid library on your computer with a simple:
git clone http://github.com/cyrilmottier/GreenDroid.git. As usual, Git will clone the GreenDroid repository and create a folder GreenDroid that contains both the project and the demonstration application.
Since May 2010, the ADT plugin added an amazing new feature: the ability to work with library projects. Using GreenDroid consists on applying the GreenDroid project as a library to your application. A complete description on how to include library projects is given on the Android documentation website. Please make sure your development environment uses the latest tools and platforms, since older releases of the tools and platforms do not support building with library project.
By default, the GreenDroid theme inherits from
@android:style/Theme. If your project inherits from a different theme, you'll have to modify the GreenDroid library on your own (and do that everytime you are updating GreenDroid as updating delete all of your changes - still working on a way to overcome that problem). Open the
res/values/gd_themes.xmland replace the parent theme
@android:style/Themewith your own theme.
- If you use some of the GD[List/Tab]Activity, make sure your application is a GDApplication. In order to do that,
greendroid.app.GDApplicationmay be replaced by your own class that inherits from
GDApplication) in the application tag of your AndroidManifest.xml.
- If you use some of the GD[List/Tab]Activity, make sure your application is a GDApplication. In order to do that, simply add
You finally need to make your project use the GreenDroid base theme. In your AndroidManifest.xml, go to the application tag and add
android:theme="@style/Theme.GreenDroid"as a new attribute.
Using the GDCatalog application
The GreenDroid project includes a demo projet called GDCatalog. This project shows some of the GreenDroid's features. I strongly encourage you to look at it as it's a great way to apprehend the library and understand how to use it in a correct manner.
GDCatalog obviously uses the GreenDroid library. As a result, it won't build until GreenDroid has been applied to it. If your IDE is up-to-date you'll have nothing particular to do. Simply press the "Play" button!
GreenDroid has been designed for Android 1.6 and greater. It may work on Android 1.5 but I don't want to provide support for this platform as it's way too old ... It has been developed using the following software:
- Eclipse IDE 3.5
- Android SDK release 2.2
- Android Development Tools (ADT) 0.9.7
Go the Android Developers website for complete installation instructions.
Copyright © Cyril Mottier firstname.lastname@example.org