public final class

ViewIdGenerator

extends Object
implements Parcelable
java.lang.Object
   ↳ com.android.contacts.ui.ViewIdGenerator

Class Overview

A class that provides unique view ids for ContentEditorView, KindSectionView, GenericEditorView and EditView on EditContactActivity. It is used to assign a unique but consistent id to each view across EditContactActivity's lifecycle, so that we can re-construct view state (e.g. focused view) when the screen rotates.

This class is not thread safe.

Summary

Constants
int NO_VIEW_INDEX
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<ViewIdGenerator> CREATOR
Public Constructors
ViewIdGenerator()
Public Methods
int describeContents()
int getId(EntityDelta entity, ContactsSource.DataKind kind, EntityDelta.ValuesDelta values, int viewIndex)
Returns an id for a view associated with specified contact field.
void writeToParcel(Parcel dest, int flags)
{@Override }
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final int NO_VIEW_INDEX

Constant Value: -1 (0xffffffff)

Fields

public static final Creator<ViewIdGenerator> CREATOR

Public Constructors

public ViewIdGenerator ()

Public Methods

public int describeContents ()

public int getId (EntityDelta entity, ContactsSource.DataKind kind, EntityDelta.ValuesDelta values, int viewIndex)

Returns an id for a view associated with specified contact field.

Parameters
entity EntityDelta associated with the view
kind ContactsSource.DataKind associated with the view, or null if none exists.
values EntityDelta.ValuesDelta associated with the view, or null if none exists.
viewIndex index of the view in the parent Editor, if it's a leave view. Otherwise, pass NO_VIEW_INDEX.

public void writeToParcel (Parcel dest, int flags)

{@Override }