DroidUX Gallery Pack consists of the DroidUX GalleryFlow™ components collection. The GalleryFlow components are
extension of the Gallery widgets with fixes, enhanced features, and other improvements to boost
the performance and polish the behavior of the widgets. Using the GalleryFlow
widgets, you can
achieve a lot more interesting effects which are not readily available or a lot more difficult to achieve with the stock Gallery widget.
Some of the enhancements implemented in these widgets includes:
GalleryFlow
widgets add a reflection effect to the views returned by the adapter's
getView(int, View, ViewGroup) method. If you want to turn off the reflection effect,
just set the dux_reflected
attribute to false
.
You can customize the reflection by changing certain attributes, e.g. dux_floorGap
to adjust the distance to the 'floor',
dux_reflectionHeight
to set the height of the reflection, etc.
GalleryFlow
widget has its own particular flow behavior which you can customize to achieve certain effects, such as cover/album flow effect
(using com.droidux.widget.gallery.GalleryFlowCover), zoom flow (com.droidux.widget.gallery.GalleryFlowZoom), scale flow
(com.droidux.widget.gallery.GalleryFlowScale), carousel flow (com.droidux.widget.gallery.GalleryFlowCarousel), wall effect (com.droidux.widget.gallery.GalleryFlowWall), etc.
GalleryFlow
widgets has a working implementation of the
view recycling/caching mechanism, which means improved performance. As discussed here and
here, the Android stock Gallery widget doesn't have a working view recycling/caching mechanism .
It's either broken or not (yet) fully implemented (see Issue #3376). This will
slow down the performance of the application using the Gallery widget, because that means the Adapter will have to
create new View for every item in the data set, instead of reusing an unused view (like the ListView).
com.droidux.widget.adapters.UrlImageAdapter
. (New in version 1.5) When the adapter implements
the com.droidux.widget.adapters.UrlImageAdapter, the web images will be downloaded using an internal downloader which has been optimized to
efficiently manage the tasks/threads to download the images.
Important:
GalleryFlow
widgets wrap their adapter views with a com.droidux.interfaces.WrapperViewInterface to add certain effects such as reflection, etc.
Therefore, functions that return adapter views, such as getChildAt(int), getSelectedView(), etc,
will return the com.droidux.interfaces.WrapperViewInterface instead of the original adapter views. To get the original view, you need to call the
com.droidux.interfaces.WrapperViewInterface#getWrappedView() function.
Compatibility Notes:
The GalleryFlow
widgets use a proprietary optimization mechanism which is not compatible with hardware acceleration (introduced in Honeycomb, API-11).
Therefore, if you're using the GalleryFlow
widgets, please make sure that the hardware acceleration is disabled at least on the <activity/>
level,
by setting the hardwareAccelerated
attribute to false
.
For more information on Android's hardware acceleration features, please follow this links:
com.droidux.pack.gallery | Contains classes needed for registration. |
com.droidux.pack.gallery.adapters | |
com.droidux.pack.gallery.anim | Provide classes to create tweened animations. |
com.droidux.pack.gallery.cache | Contains classes and interfaces to provide caching. |
com.droidux.pack.gallery.interfaces | Contains interfaces that represents contracts to be implemented by various groups of widgets. |
com.droidux.pack.gallery.widget | The widget package (and subpackages) contains (mostly visual) UI elements to use on your Application screen. |