最近公司项目要做一个跟豆瓣FM卡片式滑动的效果,看看效果图:
卡片的滑动和伸缩功能都已做好测试跟豆瓣FM 1:1还原
package org.android.mygdttst.douban;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.PaintFlagsDrawFilter;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import java.util.LinkedList;
import java.util.List;
public class IronCardView extends ViewGroup implements ICardView {
private CardAnimHelper cardAnimHelper;
private List<CardItem> cardItems;
private CardPositionHelper cardPositionHelper;
private Context context;
private DefaultTouchHelper iCardTouchHelper;
private boolean isAddView;
private OnClickListener onClickListener;
private CardPositionHelper cardPositionHelper2;
public void generateCard() {
}
public void handleTouchEvent(MotionEvent motionEvent) {
}
public void setNextListener(NextListener nextListener) {
}
public IronCardView(Context context) {
super(context);
init();
}
public IronCardView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
init();
}
public IronCardView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
init();
}