public class

GenericEditorView

extends RelativeLayout
implements View.OnClickListener Editor
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.RelativeLayout
         ↳ com.android.contacts.ui.widget.GenericEditorView

Class Overview

Simple editor that handles labels and any ContactsSource.EditField defined for the entry. Uses EntityDelta.ValuesDelta to read any existing Entity values, and to correctly write any changes values.

Summary

Constants
int INPUT_TYPE_CUSTOM
int RES_LABEL_ITEM
[Expand]
Inherited Constants
From class android.widget.RelativeLayout
From class android.view.ViewGroup
From class android.view.View
Fields
protected static final int RES_FIELD
protected View mDelete
protected EntityDelta.ValuesDelta mEntry
protected ViewGroup mFields
protected boolean mHideOptional
protected LayoutInflater mInflater
protected ContactsSource.DataKind mKind
protected TextView mLabel
protected View mLess
protected Editor.EditorListener mListener
protected View mMore
protected boolean mReadOnly
protected EntityDelta mState
protected ContactsSource.EditType mType
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
GenericEditorView(Context context)
GenericEditorView(Context context, AttributeSet attrs)
Public Methods
Dialog createLabelDialog()
Prepare dialog for picking a new ContactsSource.EditType or entering a custom label.
boolean isAnyFieldFilledOut()
void onClick(View v)
void onFieldChanged(String column, String value)
Called internally when the contents of a specific field have changed, allowing advanced editors to persist data in a specific way.
void setDeletable(boolean deletable)
void setEditorListener(Editor.EditorListener listener)
Add a specific Editor.EditorListener to this Editor.
void setEnabled(boolean enabled)
void setValues(ContactsSource.DataKind kind, EntityDelta.ValuesDelta entry, EntityDelta state, boolean readOnly, ViewIdGenerator vig)
Prepare this editor using the given ContactsSource.DataKind for defining structure and EntityDelta.ValuesDelta describing the content to edit.
Protected Methods
void onFinishInflate()
void onRestoreInstanceState(Parcelable state)
Restores the visibility of the child EditTexts, and mHideOptional.
Parcelable onSaveInstanceState()
Saves the visibility of the child EditTexts, and mHideOptional.
[Expand]
Inherited Methods
From class android.widget.RelativeLayout
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.View.OnClickListener
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource
From interface com.android.contacts.model.Editor

Constants

protected static final int INPUT_TYPE_CUSTOM

Constant Value: 8193 (0x00002001)

protected static final int RES_LABEL_ITEM

Constant Value: 17367043 (0x01090003)

Fields

protected static final int RES_FIELD

protected View mDelete

protected EntityDelta.ValuesDelta mEntry

protected ViewGroup mFields

protected boolean mHideOptional

protected LayoutInflater mInflater

protected ContactsSource.DataKind mKind

protected TextView mLabel

protected View mLess

protected Editor.EditorListener mListener

protected View mMore

protected boolean mReadOnly

protected EntityDelta mState

protected ContactsSource.EditType mType

Public Constructors

public GenericEditorView (Context context)

public GenericEditorView (Context context, AttributeSet attrs)

Public Methods

public Dialog createLabelDialog ()

Prepare dialog for picking a new ContactsSource.EditType or entering a custom label. This dialog is limited to the valid types as determined by EntityModifier.

public boolean isAnyFieldFilledOut ()

public void onClick (View v)

public void onFieldChanged (String column, String value)

Called internally when the contents of a specific field have changed, allowing advanced editors to persist data in a specific way.

public void setDeletable (boolean deletable)

public void setEditorListener (Editor.EditorListener listener)

Add a specific Editor.EditorListener to this Editor.

public void setEnabled (boolean enabled)

public void setValues (ContactsSource.DataKind kind, EntityDelta.ValuesDelta entry, EntityDelta state, boolean readOnly, ViewIdGenerator vig)

Prepare this editor using the given ContactsSource.DataKind for defining structure and EntityDelta.ValuesDelta describing the content to edit.

Protected Methods

protected void onFinishInflate ()

protected void onRestoreInstanceState (Parcelable state)

Restores the visibility of the child EditTexts, and mHideOptional.

protected Parcelable onSaveInstanceState ()

Saves the visibility of the child EditTexts, and mHideOptional.