Since: API Level 3.0
public static interface

ViewEffectLayout.ViewEffect

com.droidux.ui.widgets.gallery.ViewEffectLayout.ViewEffect

Class Overview

An implementation of this class can be used to apply custom effects to the item views of GalleryFlow widgets, if the item views are wrapped by the ViewEffectLayout. To apply the custom effect, you must set the gallery's custom attribute duxglr_viewEffect_type to custom, and call the setCustomViewEffect(com.droidux.ui.widgets.gallery.ViewEffectLayout.ViewEffect) with the custom effect.

Summary

Public Methods
abstract Paint getEffectPaint(float effectStrength, float maxEffectStrength)
Returns the Paint object to be applied in drawing the item views to the canvas.

Public Methods

public abstract Paint getEffectPaint (float effectStrength, float maxEffectStrength)

Since: API Level 3.0

Returns the Paint object to be applied in drawing the item views to the canvas.

Parameters
effectStrength The strength factor of the effect. The value is between 0.0-1.0. A value of 0.0 means that the item view is at the center of the gallery, so no effect to be applied. A value of 1.0 means that the item view, is at the edge of the gallery. However, you need to take into account the maxEffectStrength parameter value if you don't want the effect to pass the max value.
maxEffectStrength The maximum strength of the effect. This value is set using the duxglr_viewEffect_maxstrength attribute. This is the effect strength when the item view reach a distance determined by the duxglr_distanceMaxEffect. You can use this value to make sure that the strength of your custom effect doesn't pass the max value. Valid range: 0.0-1.0
Returns
  • The Paint object to be applied in drawing the item views to the canvas.