Skip to content

chiemy/CardView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a237f08 · Jun 30, 2017

History

13 Commits
Sep 1, 2014
Sep 11, 2014
Sep 19, 2015
Sep 1, 2014
Sep 1, 2014
Sep 1, 2014
Sep 2, 2014
Sep 19, 2015
Sep 2, 2014
Sep 1, 2014
Sep 1, 2014
Sep 1, 2014
Apr 17, 2017

Repository files navigation

效果图

3d卡片效果

  • 测试版本4.1.2,4.2.2,4.4.2可用

2014-9-11修改

  • 修复设置高度wrap_content时显示不全的bug
  • 修复点击后,翻转过程中向下滑动出现的bug

注意:如果设置高度为wrap_content,为了保证动画视觉上的完整性,需要设置自身及所有关联窗口的android:clipChildren属性为false(代码中setClipChildren(false))。

使用

CardView cardView = (CardView) findViewById(R.id.cardView1);
//设置间距
cardView.setItemSpace(Utils.convertDpToPixelInt(this, 20));
//设置可见数量,默认4个
cardView.setMaxVisibleCount(4);
//点击顶部card监听
cardView.setOnCardClickListener(new OnCardClickListener(){
	public void onCardClick(View view, int position) {
	}
});

问题

  • 测试2.3.2有严重bug(估计4.0版本之前都有此bug),不可用。