Skip to content

Commit

Permalink
Reusing getAnimationDuration() for animation duration
Browse files Browse the repository at this point in the history
  • Loading branch information
naddaf committed Apr 17, 2013
1 parent 9d18456 commit 98ac8a2
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,6 @@ public abstract class AbstractSlideExpandableListAdapter extends WrapperListAdap
*/
private ViewGroup parent;

/**
* Sets the duration of the animation that scrolls the hidden expanded area into
* the visible view (in milliseconds)
*/
private int scrollAnimationDuration = 1000;


private boolean froyoOrAbove;

public AbstractSlideExpandableListAdapter(ListAdapter wrapped) {
Expand Down Expand Up @@ -287,10 +280,10 @@ public void onAnimationEnd(Animation animation) {
listView.getGlobalVisibleRect(r2);

if (!visible) {
listView.smoothScrollBy(movement, scrollAnimationDuration);
listView.smoothScrollBy(movement, getAnimationDuration());
} else {
if (r2.bottom == r.bottom) {
listView.smoothScrollBy(movement, scrollAnimationDuration);
listView.smoothScrollBy(movement, getAnimationDuration());
}
}
}
Expand Down

0 comments on commit 98ac8a2

Please sign in to comment.