public class

MultiAutoCompleteNoteEditor

extends MultiAutoCompleteTextView
implements NoteInterface
java.lang.Object
   ↳ android.view.View
     ↳ android.widget.TextView
       ↳ android.widget.EditText
         ↳ android.widget.AutoCompleteTextView
           ↳ android.widget.MultiAutoCompleteTextView
             ↳ com.droidux.pack.commons.widget.editor.MultiAutoCompleteNoteEditor

Class Overview

A subclass of MultiAutoCompleteTextView with additional features, such as options to draw lines, color margins, gradient color background, etc to simulate notepad paper.

Summary

XML Attributes
Attribute Name Related Method Description
dux_drawLine setShouldDrawLine(boolean) Controls whether a horizontal line should be drawn across the note widget. 
dux_drawMargin setShouldDrawMargin(boolean) Controls whether to draw a color margin on the left side of the widget. 
dux_lineColor setLineColor(int) Specifies the line color to be used if the dux_drawLine is set to true
dux_marginColor setMarginColor(int) Specifies the margin color to be used if the dux_drawMargin is set to true
dux_marginType setMarginType(int) The type of the paper color for use as background of text editing widgets. 
dux_marginWidth setMarginWidth(int) Specifies the width of the margin, if the dux_drawMargin is set to true
dux_paperColor setPaperColor(int) Specifies the paper color for use as background of text editing widgets. 
dux_paperColorType setPaperColorType(int) The type of the paper color for use as background of text editing widgets. 
[Expand]
Inherited XML Attributes
From interface com.droidux.pack.commons.widget.editor.NoteInterface
[Expand]
Inherited Constants
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
From interface com.droidux.pack.commons.widget.editor.NoteInterface
Public Constructors
MultiAutoCompleteNoteEditor(Context context)
MultiAutoCompleteNoteEditor(Context context, AttributeSet attrs)
Public Methods
int getLineColor()
Gets the color to use to draw the horizontal lines.
int getMarginColor()
Gets the color to use to draw the colored margin.
int getMarginType()
Returns the margin type.
int getMarginWidth()
Gets the width of the colored margin.
int getPaperColor()
Gets the base color to use to draw the background.
int getPaperColorType()
Gets the type of color to use to draw the background.
boolean getShouldDrawLine()
Gets whether to draw horizontal lines.
boolean getShouldDrawMargin()
Gets whether to draw a colored margin.
void setLineColor(int color)
Sets the color to use to draw the horizontal lines.
void setMarginColor(int color)
Sets the color to use to draw the colored margin.
void setMarginType(int type)
Sets the type of the margin.
void setMarginWidth(int width)
Sets the width of the colored margin.
void setPaperColor(int color)
Sets the base color to use to draw the background.
void setPaperColorType(int type)
Sets the type of color to use to draw the background.
void setShouldDrawLine(boolean draw)
Sets whether to draw horizontal lines.
void setShouldDrawMargin(boolean draw)
Sets whether to draw a colored margin.
[Expand]
Inherited Methods
From class android.widget.MultiAutoCompleteTextView
From class android.widget.AutoCompleteTextView
From class android.widget.EditText
From class android.widget.TextView
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.ViewTreeObserver.OnPreDrawListener
From interface android.view.accessibility.AccessibilityEventSource
From interface android.widget.Filter.FilterListener
From interface com.droidux.pack.commons.widget.editor.NoteInterface

XML Attributes

dux_drawLine

Since: API Level

Controls whether a horizontal line should be drawn across the note widget. 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

dux_drawMargin

Since: API Level

Controls whether to draw a color margin on the left side of the widget. Default is false.

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.

dux_lineColor

Since: API Level

Specifies the line color to be used if the dux_drawLine is set to true. If the line color is not specified and the dux_drawLine is true, a color will be automatically calculated.

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_marginColor

Since: API Level

Specifies the margin color to be used if the dux_drawMargin is set to true.

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_marginType

Since: API Level

The type of the paper color for use as background of text editing widgets.

Must be one of the following constant values.

ConstantValueDescription
solid0 Use solid color.
gradient1 Use gradient color. The gradient color will be automatically created based on the color specified by the dux_paperColor attribute.

Related Methods

dux_marginWidth

Since: API Level

Specifies the width of the margin, if the dux_drawMargin is set to true. 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 "2.5sp". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters).

Related Methods

dux_paperColor

Since: API Level

Specifies the paper color for use as background of text editing widgets. If the widget already has a background, the color specified by this attribute will be drawn over the background, so you might need to adjust the opacity of the color to still see the background. You can use a transparent color to not draw a color on the background.

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_paperColorType

Since: API Level

The type of the paper color for use as background of text editing widgets.

Must be one of the following constant values.

ConstantValueDescription
solid0 Use solid color.
gradient1 Use gradient color. The gradient color will be automatically created based on the color specified by the dux_paperColor attribute.

Related Methods

Public Constructors

public MultiAutoCompleteNoteEditor (Context context)

Since: API Level 2.5

public MultiAutoCompleteNoteEditor (Context context, AttributeSet attrs)

Since: API Level 2.5

Public Methods

public int getLineColor ()

Since: API Level 2.5

Gets the color to use to draw the horizontal lines.

Related XML Attributes
Returns
  • The line color.

public int getMarginColor ()

Since: API Level 2.5

Gets the color to use to draw the colored margin.

Related XML Attributes
Returns
  • The margin color.

public int getMarginType ()

Since: API Level 2.5

Returns the margin type.

Related XML Attributes

public int getMarginWidth ()

Since: API Level 2.5

Gets the width of the colored margin.

Related XML Attributes
Returns
  • The width of the margin.

public int getPaperColor ()

Since: API Level 2.5

Gets the base color to use to draw the background.

Related XML Attributes
Returns
  • The color.

public int getPaperColorType ()

Since: API Level 2.5

Gets the type of color to use to draw the background.

Related XML Attributes
Returns
  • The type of color. Can be solid or gradient.

public boolean getShouldDrawLine ()

Since: API Level 2.5

Gets whether to draw horizontal lines.

Related XML Attributes
Returns
  • If true, horizontal lines will be drawn.

public boolean getShouldDrawMargin ()

Since: API Level 2.5

Gets whether to draw a colored margin.

Related XML Attributes
Returns
  • If true, a colored margin will be drawn.

public void setLineColor (int color)

Since: API Level 2.5

Sets the color to use to draw the horizontal lines.

Related XML Attributes
Parameters
color The line color.

public void setMarginColor (int color)

Since: API Level 2.5

Sets the color to use to draw the colored margin.

Related XML Attributes
Parameters
color The margin color.

public void setMarginType (int type)

Since: API Level 2.5

Sets the type of the margin.

Related XML Attributes
Parameters
type The margin type.

public void setMarginWidth (int width)

Since: API Level 2.5

Sets the width of the colored margin.

Related XML Attributes
Parameters
width The width of the margin.

public void setPaperColor (int color)

Since: API Level 2.5

Sets the base color to use to draw the background.

Related XML Attributes
Parameters
color The color.

public void setPaperColorType (int type)

Since: API Level 2.5

Sets the type of color to use to draw the background.

Related XML Attributes
Parameters
type The type of color. Can be solid or gradient.

public void setShouldDrawLine (boolean draw)

Since: API Level 2.5

Sets whether to draw horizontal lines.

Related XML Attributes
Parameters
draw If true, horizontal lines will be drawn.

public void setShouldDrawMargin (boolean draw)

Since: API Level 2.5

Sets whether to draw a colored margin.

Related XML Attributes
Parameters
draw If true, a colored margin will be drawn.