public class

MaskedLayout

extends FrameLayout
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ com.droidux.pack.layouts.widget.MaskedLayout

Class Overview

Layout with a maskable viewport.

Summary

XML Attributes
Attribute Name Related Method Description
dux_maskDrawable setMaskDrawable(int) Reference to a drawable resource to use as a mask. 
dux_maskMode The mask's mode determine whether to mask the whole view (including the background) or only the content. 
[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
MaskedLayout(Context context)
MaskedLayout(Context context, AttributeSet attrs)
MaskedLayout(Context context, AttributeSet attrs, int defStyle)
Public Methods
Drawable getMaskDrawable()
Retrieve the mask drawable, or null if no drawable has been set as a mask.
void setMaskDrawable(Drawable mask)
Sets the mask drawable.
void setMaskDrawable(int mask)
Sets the mask drawable.
[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

dux_maskDrawable

Since: API Level

Reference to a drawable resource to use as a mask.

Must be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".

Related Methods

dux_maskMode

Since: API Level

The mask's mode determine whether to mask the whole view (including the background) or only the content. Default is all.

Must be one of the following constant values.

ConstantValueDescription
all0 Mask the whole view, including background.
content1 Only mask the content, excluding the background.

Related Methods

Public Constructors

public MaskedLayout (Context context)

Since: API Level 2.5

public MaskedLayout (Context context, AttributeSet attrs)

Since: API Level 2.5

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

Since: API Level 2.5

Public Methods

public Drawable getMaskDrawable ()

Since: API Level 2.5

Retrieve the mask drawable, or null if no drawable has been set as a mask.

Returns
  • The mask drawable or null if none is set.

public void setMaskDrawable (Drawable mask)

Since: API Level 2.5

Sets the mask drawable.

Related XML Attributes
Parameters
mask The drawable used to mask the layout.

public void setMaskDrawable (int mask)

Since: API Level 2.5

Sets the mask drawable.

Related XML Attributes
Parameters
mask The drawable resource used to mask the layout.