public abstract class

BaseContactEditorView

extends LinearLayout
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.LinearLayout
         ↳ com.android.contacts.ui.widget.BaseContactEditorView
Known Direct Subclasses

Class Overview

Base view that provides common code for the editor interaction for a specific RawContact represented through an EntityDelta. Callers can reuse this view and quickly rebuild its contents through #setState(EntityDelta, ContactsSource).

Internal updates are performed against EntityDelta.ValuesDelta so that the source Entity can be swapped out. Any state-based changes, such as adding Data rows or changing ContactsSource.EditType, are performed through EntityModifier to ensure that ContactsSource are enforced.

Summary

[Expand]
Inherited Constants
From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View
Fields
protected boolean mHasPhotoEditor
protected LayoutInflater mInflater
protected PhotoEditorView mPhoto
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
BaseContactEditorView(Context context)
BaseContactEditorView(Context context, AttributeSet attrs)
Public Methods
PhotoEditorView getPhotoEditor()
abstract long getRawContactId()
boolean hasPhotoEditor()
Return true if the current RawContacts supports Photo, which means that PhotoEditorView is enabled.
boolean hasSetPhoto()
Return true if internal PhotoEditorView has a Photo set.
abstract void setNameEditorListener(Editor.EditorListener listener)
Sets the Editor.EditorListener on the name field
void setPhotoBitmap(Bitmap bitmap)
Assign the given Bitmap to the internal PhotoEditorView for the EntityDelta currently being edited.
abstract void setState(EntityDelta state, ContactsSource source, ViewIdGenerator vig)
Set the internal state for this view, given a current EntityDelta state and the ContactsSource that apply to that state.
[Expand]
Inherited Methods
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

Fields

protected boolean mHasPhotoEditor

protected LayoutInflater mInflater

protected PhotoEditorView mPhoto

Public Constructors

public BaseContactEditorView (Context context)

public BaseContactEditorView (Context context, AttributeSet attrs)

Public Methods

public PhotoEditorView getPhotoEditor ()

public abstract long getRawContactId ()

Returns
  • the RawContact ID that this editor is editing.

public boolean hasPhotoEditor ()

Return true if the current RawContacts supports Photo, which means that PhotoEditorView is enabled.

public boolean hasSetPhoto ()

Return true if internal PhotoEditorView has a Photo set.

public abstract void setNameEditorListener (Editor.EditorListener listener)

Sets the Editor.EditorListener on the name field

public void setPhotoBitmap (Bitmap bitmap)

Assign the given Bitmap to the internal PhotoEditorView for the EntityDelta currently being edited.

public abstract void setState (EntityDelta state, ContactsSource source, ViewIdGenerator vig)

Set the internal state for this view, given a current EntityDelta state and the ContactsSource that apply to that state.