BasicFieldVariableView.VariableViewAdapter

public static class BasicFieldVariableView.VariableViewAdapter extends ArrayAdapter<String>

An implementation of ArrayAdapter that wraps the NameManager.VariableNameManager to create the variable item views.

Nested Class Summary

@interface BasicFieldVariableView.VariableViewAdapter.VariableAdapterType  

Constant Summary

int ACTION_DELETE_VARIABLE
int ACTION_RENAME_VARIABLE
int ACTION_SELECT_VARIABLE

Inherited Constant Summary

Public Constructor Summary

BasicFieldVariableView.VariableViewAdapter(Context context, NameManager variableNameManager, int resource)

Public Method Summary

int
String
getItem(int index)
int
getOrCreateVariableIndex(String variableName)
Retrieves the index for the given variable name, creating a new variable if it is not found.
int
getVariableAction(int index)

Inherited Method Summary

Constants

public static final int ACTION_DELETE_VARIABLE

Constant Value: 2

public static final int ACTION_RENAME_VARIABLE

Constant Value: 1

public static final int ACTION_SELECT_VARIABLE

Constant Value: 0

Public Constructors

public BasicFieldVariableView.VariableViewAdapter (Context context, NameManager variableNameManager, int resource)

Parameters
context A context for inflating layouts.
variableNameManager The name manager containing the variables.
resource The TextView layout to use when inflating items.

Public Methods

public int getCount ()

public String getItem (int index)

Parameters
index

public int getOrCreateVariableIndex (String variableName)

Retrieves the index for the given variable name, creating a new variable if it is not found.

Parameters
variableName The name of the variable to retrieve.
Returns
  • The index of the variable.

public int getVariableAction (int index)

Parameters
index