public class

StandardColorAppBar

extends StandardAppBar
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.LinearLayout
         ↳ com.droidux.pack.action.widget.StandardAppBar
           ↳ com.droidux.pack.action.widget.StandardColorAppBar

Class Overview

A simplified version of StandardAppBar that use a gradient of color as background. To specify the background color, use the setBackgroundColor(int), setBackgroundColor(int, float), or using the dux_color XML attribute.

Summary

XML Attributes
Attribute Name Related Method Description
dux_color setTintColor(int) Specifies a color. 
dux_gradientFactor The factor used to create a gradient color for use as backround of an application bar. 
[Expand]
Inherited XML Attributes
From class com.droidux.pack.action.widget.StandardAppBar
[Expand]
Inherited Constants
From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class com.droidux.pack.action.widget.StandardAppBar
From class android.view.View
Public Constructors
StandardColorAppBar(Context context)
StandardColorAppBar(Context context, AttributeSet attrs)
Public Methods
void setBackgroundColor(int color, float gradientFactor)
Sets the background color of this view using specified gradient factor.
void setBackgroundColor(int color)
Sets the background of this application bar using default gradient factor.
void setTintColor(int color)
Sets the tint color used to colorize the background drawable and the separator drawable (if any).
[Expand]
Inherited Methods
From class com.droidux.pack.action.widget.StandardAppBar
From class android.widget.LinearLayout
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_color

Since: API Level

Specifies a color.

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

May be a color value, in the form of "#rgb", "#argb", "#rrggbb", or "#aarrggbb".

Related Methods

dux_gradientFactor

Since: API Level

The factor used to create a gradient color for use as backround of an application bar.

Related Methods

Public Constructors

public StandardColorAppBar (Context context)

Since: API Level 2.5

public StandardColorAppBar (Context context, AttributeSet attrs)

Since: API Level 2.5

Public Methods

public void setBackgroundColor (int color, float gradientFactor)

Since: API Level 2.5

Sets the background color of this view using specified gradient factor.

Parameters
color The main color of the background.
gradientFactor The gradient factor used to create a gradient color based on the specified color. The gradient factor is used to calculate the darker and lighter color based on the main color.

public void setBackgroundColor (int color)

Since: API Level

Sets the background of this application bar using default gradient factor.

Parameters
color The main color of the background.

public void setTintColor (int color)

Since: API Level 2.5

Sets the tint color used to colorize the background drawable and the separator drawable (if any).

Related XML Attributes
Parameters
color The tint color.