Bug 786982: Add the hiding of close tab, while swiping. r=lucasr

This commit is contained in:
Sriram Ramasubramanian 2012-11-06 11:24:14 -08:00
parent 443a146159
commit c634461eab

View File

@ -324,6 +324,15 @@ public class TabsTray extends LinearLayout
PropertyAnimator animator = new PropertyAnimator(ANIMATION_DURATION); PropertyAnimator animator = new PropertyAnimator(ANIMATION_DURATION);
animator.attach(view, Property.ALPHA, 1); animator.attach(view, Property.ALPHA, 1);
animator.attach(view, Property.TRANSLATION_X, 0); animator.attach(view, Property.TRANSLATION_X, 0);
animator.setPropertyAnimationListener(new PropertyAnimator.PropertyAnimationListener() {
public void onPropertyAnimationStart() { }
public void onPropertyAnimationEnd() {
TabRow tab = (TabRow) view.getTag();
tab.close.setVisibility(View.VISIBLE);
}
});
animator.start(); animator.start();
} }
@ -472,6 +481,7 @@ public class TabsTray extends LinearLayout
mListView.requestDisallowInterceptTouchEvent(true); mListView.requestDisallowInterceptTouchEvent(true);
TabRow tab = (TabRow) mSwipeView.getTag(); TabRow tab = (TabRow) mSwipeView.getTag();
tab.close.setVisibility(View.INVISIBLE);
// Stops listview from highlighting the touched item // Stops listview from highlighting the touched item
// in the list when swiping. // in the list when swiping.