Cyril Mottier

β€œIt’s the little details that are vital. Little things make big things happen.” – John Wooden

New GreenDroid: PagedView, MapPinDrawable, Etc.

I’ve recently pushed a new version (v0.2) of the GreenDroid library for Android to GitHub. This new version brings some new amazing features to developers and fixes some bugs. Here is the list of changes:

  • [NEW] Add a new GDExpandableListActivity. This is the GreenDroid equivalent to a regular ExpandableListActivity
  • [NEW] Add of a new theme attribute gdTabIndicatorStyle allowing basic GDTabActivity tabs styling
  • [NEW] Add of some basic ImageProcessors.
    • ScaleImageProcessor may be used to scale an image from the network prior displaying it
    • MaskImageProcessor masks an image according to a given shape or Bitmap
    • ChainImageProcessor sequentially applies ImageProcessors to an image
  • [NEW] Add a new attribute in the style to change the color of all ActionBarItem
    • gdActionBarItemColorNormal changes the color of all ActionBarItems in normal mode
    • gdActionBarItemColorAlt changes the color of all ActionBarItems in alternative (pressed/focused) mode
  • [NEW] Add of a MapPinDrawable helping developers to easily create colored pins for MapView
    • MapPinDrawable is based on the original creation of Roman Nurik for the Cycle Hire Surgery
  • [NEW] Add of a new PagedView widget. A PagedView shows items in a ‘paged’ manner. Pages can be scrolled horizontally by swiping the View. The PagedView uses a reuse mechanism similar to the one used by the ListView. It is usually a good idea to show the user which page is currently on screen. This can be easily done with a PageIndicator.
  • [CHANGE] The ThumbnailItemView now uses an AsyncImageView instead of the regular ImageView
    • This change allow developer to use URLs directly via the greendroid:thumbnailURL XML attribute or via the thumbnailURL property of the ThumbnailItem.
  • [CHANGE] Time related constants are now of type long (types previously used was int)
  • [CHANGE] Using one of the setActionBarContentView more than once was stacking views on top of each other. Starting from now setActionBarContentView acts like setContentView and remove all subviews prior setting the new one.
  • [FIXED] Using one of the setActionBarContentView in GDListActivity was buggy. The setActionBarContentView methods are helpers that should only be used in GDActivity to help developers adding an ActionBar to their already existing layouts. If you really want a custom layout in GDListActivity you should be using the createLayout method.
  • [FIXED] The GDTabActivity was not correctly handling clicks on the home button
  • [FIXED] Add missing leading zero for single digit hex values in the MD5Utils class

As you can see, there are a lot of changes. I don’t have time to explain all of those changes and I think the explanations given above are quite clear. However, I’d like to draw your attention to the PagedView and MapPinDrawable. Feel free to test those new features with the GDCatalog application available on the Android Market:

As usual, the code is open-source and available on the GitHub page of the project:

That’s all! I sincerely hope you’ll like this new release. Do not hesitate leave a comment below …