package de.tudarmstadt.informatik.hostage.ui2.swipelist;

import android.content.Context;
import android.util.AttributeSet;

/**
 * @author Alexander Brakowski
 * @created 28.02.14 22:05
 */
public class SwipeListView extends com.fortysevendeg.android.swipelistview.SwipeListView {


	public SwipeListView(Context context, int swipeBackView, int swipeFrontView) {
		super(context, swipeBackView, swipeFrontView);
	}

	public SwipeListView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public SwipeListView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	protected void onOpened(int position, boolean toRight) {
		super.onOpened(position, toRight);

		int start = getFirstVisiblePosition();
		int end = getLastVisiblePosition();

		for(int i=start; i<=end; i++){
			if(i != position){
				closeAnimate(i);
			}
		}
	}
}
