|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.view.View
android.widget.TextView
android.widget.EditText
android.widget.AutoCompleteTextView
android.webkit.TextDialog
class TextDialog
TextDialog is a specialized version of EditText used by WebView to overlay html textfields (and textareas) to use our standard text editing.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class android.widget.AutoCompleteTextView |
|---|
AutoCompleteTextView.Validator |
| Nested classes/interfaces inherited from class android.widget.TextView |
|---|
TextView.BufferType, TextView.SavedState |
| Nested classes/interfaces inherited from class android.view.View |
|---|
View.BaseSavedState, View.MeasureSpec, View.OnClickListener, View.OnCreateContextMenuListener, View.OnFocusChangeListener, View.OnKeyListener, View.OnLongClickListener, View.OnTouchListener |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
TextDialog(Context context,
WebView webView)
Create a new TextDialog. |
|
| Method Summary | |
|---|---|
boolean |
dispatchKeyEvent(KeyEvent event)
Dispatch a key event to the next view on the focus path. |
(package private) boolean |
isSameTextField(int ptr)
Determine whether this TextDialog currently represents the node represented by ptr. |
boolean |
onPreDraw()
Callback method to be invoked when the view tree is about to be drawn. |
protected void |
onTextChanged(CharSequence s,
int start,
int before,
int count)
This method is called when the text is changed, in case any subclasses would like to know. |
boolean |
onTrackballEvent(MotionEvent event)
Implement this method to handle trackball motion events. |
(package private) void |
remove()
Remove this TextDialog from its host WebView, and return focus to the host. |
boolean |
requestRectangleOnScreen(Rect rectangle)
Request that a rectangle of this view be visible on the screen, scrolling if necessary just enough. |
(package private) void |
setInPassword(boolean inPassword)
Determine whether to use the system-wide password disguising method, or to use none. |
(package private) void |
setMaxLength(int maxLength)
|
(package private) void |
setNodePointer(int ptr)
Set the pointer for this node so it can be determined which node this TextDialog represents. |
(package private) void |
setRect(int x,
int y,
int width,
int height)
Determine the position and size of TextDialog, and add it to the WebView's view heirarchy. |
void |
setSingleLine(boolean single)
Set whether this is a single-line textfield or a multi-line textarea. |
(package private) void |
setText(CharSequence text,
int start,
int end)
Set the text for this TextDialog, and set the selection to (start, end) |
(package private) void |
setTextAndKeepSelection(String text)
Set the text to the new string, but use the old selection, making sure to keep it within the new string. |
(package private) void |
updateCachedTextfield()
Update the cache to reflect the current text. |
| Methods inherited from class android.widget.EditText |
|---|
extendSelection, getDefaultEditable, getDefaultMovementMethod, getText, selectAll, setSelection, setSelection, setText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
TextDialog(Context context,
WebView webView)
context - The Context for this TextDialog.webView - The WebView that created this.| Method Detail |
|---|
public boolean dispatchKeyEvent(KeyEvent event)
View
dispatchKeyEvent in class Viewevent - The key event to be dispatched.
boolean isSameTextField(int ptr)
ptr - Pointer to a node to compare to.
public boolean onPreDraw()
TextView
onPreDraw in interface ViewTreeObserver.OnPreDrawListeneronPreDraw in class TextViewView.onMeasure(int, int),
View.onLayout(boolean, int, int, int, int),
View.onDraw(android.graphics.Canvas)
protected void onTextChanged(CharSequence s,
int start,
int before,
int count)
TextView
onTextChanged in class AutoCompleteTextViews - The text the TextView is displaying.start - The offset of the start of the range of the text
that was modified.before - The offset of the former end of the range of the
text that was modified. If text was simply inserted,
this will be the same as start.
If text was replaced with new text or deleted, the
length of the old text was before-start.count - The offset of the end of the range of the text
that was modified. If text was simply deleted,
this will be the same as start.
If text was replaced with new text or inserted,
the length of the new text is after-start.public boolean onTrackballEvent(MotionEvent event)
ViewMotionEvent.getX() and
MotionEvent.getY(). These are normalized so
that a movement of 1 corresponds to the user pressing one DPAD key (so
they will often be fractional values, representing the more fine-grained
movement information available from a trackball).
onTrackballEvent in class TextViewevent - The motion event.
void remove()
public boolean requestRectangleOnScreen(Rect rectangle)
View
requestRectangleOnScreen in class Viewrectangle - The rectangle.
void setInPassword(boolean inPassword)
inPassword - True if the textfield is a password field.void setMaxLength(int maxLength)
void setNodePointer(int ptr)
ptr - Integer representing the pointer to the node which this
TextDialog represents.
void setRect(int x,
int y,
int width,
int height)
x - x-position of the textfield.y - y-position of the textfield.width - width of the textfield.height - height of the textfield.public void setSingleLine(boolean single)
setSingleLine in class TextView
void setText(CharSequence text,
int start,
int end)
text - Text to go into this TextDialog.start - Beginning of the selection.end - End of the selection.void setTextAndKeepSelection(String text)
text - The new text to place in the textfield.void updateCachedTextfield()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||