Methods Summary |
---|
public void | addView(android.view.View child, int index, ViewGroup.LayoutParams params){@inheritDoc}
if (!(child instanceof TextView)) {
throw new IllegalArgumentException(
"TextSwitcher children must be instances of TextView");
}
super.addView(child, index, params);
|
public void | onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent event)
super.onInitializeAccessibilityEvent(event);
event.setClassName(TextSwitcher.class.getName());
|
public void | onInitializeAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo info)
super.onInitializeAccessibilityNodeInfo(info);
info.setClassName(TextSwitcher.class.getName());
|
public void | setCurrentText(java.lang.CharSequence text)Sets the text of the text view that is currently showing. This does
not perform the animations.
((TextView)getCurrentView()).setText(text);
|
public void | setText(java.lang.CharSequence text)Sets the text of the next view and switches to the next view. This can
be used to animate the old text out and animate the next text in.
final TextView t = (TextView) getNextView();
t.setText(text);
showNext();
|