Methods Summary |
---|
void | clear()
mEntries.clear();
mEntries.add(new HistoryEntry(""));
mPos = 0;
notifyChanged();
|
HistoryEntry | current()
return mEntries.elementAt(mPos);
|
void | enter(java.lang.String text)
current().clearEdited();
if (mEntries.size() >= MAX_ENTRIES) {
mEntries.remove(0);
}
if (mEntries.size() < 2 ||
!text.equals(mEntries.elementAt(mEntries.size() - 2).getBase())) {
mEntries.insertElementAt(new HistoryEntry(text), mEntries.size() - 1);
}
mPos = mEntries.size() - 1;
notifyChanged();
|
java.lang.String | getBase()
return current().getBase();
|
java.lang.String | getText()
return current().getEdited();
|
boolean | moveToNext()
if (mPos < mEntries.size() - 1) {
++mPos;
return true;
}
return false;
|
boolean | moveToPrevious()
if (mPos > 0) {
--mPos;
return true;
}
return false;
|
private void | notifyChanged()
if (mObserver != null) {
mObserver.notifyDataSetChanged();
}
|
void | setObserver(android.widget.BaseAdapter observer)
mObserver = observer;
|
void | update(java.lang.String text)
current().setEdited(text);
|
void | write(java.io.DataOutput out)
out.writeInt(mEntries.size());
for (HistoryEntry entry : mEntries) {
entry.write(out);
}
out.writeInt(mPos);
|