public class

ViewEffectLayout

extends FrameLayout
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ com.droidux.ui.widgets.gallery.ViewEffectLayout

Class Overview

A special layout that can be used to wrap the item views of GalleryFlow widgets to add some effect, such as reflection, fade, dim, etc.

Summary

Nested Classes
interface ViewEffectLayout.ViewEffect 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
XML Attributes
Attribute Name Related Method Description
duxglr_viewEffect_maxstrength Specifies the strength of the effect to be apply to the view (see the duxglr_viewEffect_type attribute). 
duxglr_viewEffect_type Specifies the effect to be applied to the view. 
duxglr_withReflection Controls whether the view should be reflected. 
duxglr_withReflection_gap Specifies the distance from the bottom of the reflected view to the "floor". 
duxglr_withReflection_height Specifies the factor to determine the reflection height. 
duxglr_withReflection_strength Specifies the strength of the reflection. 
[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
ViewEffectLayout(Context context)
ViewEffectLayout(Context context, AttributeSet attrs)
ViewEffectLayout(Context context, AttributeSet attrs, int defStyle)
[Expand]
Inherited Methods
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource

XML Attributes

duxglr_viewEffect_maxstrength

Since: API Level

Specifies the strength of the effect to be apply to the view (see the duxglr_viewEffect_type attribute). Should be between 0.0 - 1.0 inclusive.

Must be a floating point value, such as "1.2".

This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.

Related Methods

duxglr_viewEffect_type

Since: API Level

Specifies the effect to be applied to the view.

Must be one of the following constant values.

ConstantValueDescription
none0Don't apply any effect.
antialiasing1Apply a antialiasing effect. The antialiasing will draw the view with antialiasing paint. This effect is useful only if reflection is disabled. When reflection is enabled, the view will always be drawn with antialiasing paint.
dim2Apply a dim effect. The dim effect will make the view desaturated.
fade3Apply a fade effect. The fade effect will change the opacity/alpha of the view.
fade_dim4Apply both the fade and dim effects.
custom5Apply a custom effect. You must supply an implementation of ViewEffectLayout.ViewEffect.

Related Methods

duxglr_withReflection

Since: API Level

Controls whether the view should be reflected. Default is true.

Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.

Related Methods

duxglr_withReflection_gap

Since: API Level

Specifies the distance from the bottom of the reflected view to the "floor". Its value should be a dimension (such as "5dip").

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters).

This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.

Related Methods

duxglr_withReflection_height

Since: API Level

Specifies the factor to determine the reflection height. The reflection height will be the specified factor multiplied by the view's getHeight(). Should be between 0.0 - 1.0 inclusive.

Must be a floating point value, such as "1.2".

This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.

Related Methods

duxglr_withReflection_strength

Since: API Level

Specifies the strength of the reflection. This value is a factor that determines the opacity/alpha of the reflection. Should be between 0.0 - 1.0 inclusive.

Must be a floating point value, such as "1.2".

This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.

Related Methods

Public Constructors

public ViewEffectLayout (Context context)

Since: API Level 3.0

public ViewEffectLayout (Context context, AttributeSet attrs)

Since: API Level 3.0

public ViewEffectLayout (Context context, AttributeSet attrs, int defStyle)

Since: API Level 3.0