Fix 2404771: Expose reset() in SlidingTab widget so we can reset it when we get an incoming call.

Updated javadoc.
This commit is contained in:
Jim Miller
2010-01-29 17:25:26 -08:00
parent 9800adf2a4
commit d8a3a8957b

View File

@@ -548,12 +548,22 @@ public class SlidingTab extends ViewGroup {
return true; return true;
} }
/**
* Reset the tabs to their original state and stop any existing animation.
* Animate them back into place if animate is true.
*
* @param animate
*/
public void reset(boolean animate) {
mLeftSlider.reset(animate);
mRightSlider.reset(animate);
}
@Override @Override
public void setVisibility(int visibility) { public void setVisibility(int visibility) {
// Clear animations so sliders don't continue to animate when we show the widget again. // Clear animations so sliders don't continue to animate when we show the widget again.
if (visibility != getVisibility() && visibility == View.INVISIBLE) { if (visibility != getVisibility() && visibility == View.INVISIBLE) {
mLeftSlider.reset(false); reset(false);
mRightSlider.reset(false);
} }
super.setVisibility(visibility); super.setVisibility(visibility);
} }