MaterialRecents
- 视图布局 (View Layout)
- ★★★★★
- 2015-09-15 09:16
- 2100 kb
- Android Studio
- 1089 次
- 189 次
- https://github.com/ZieIony/MaterialRecents
- 动画,卡片
下载 收藏
ZieIony / MaterialRecents
Lollipop's Recents container
29864
介绍:
一个仿安卓5.0任务管理器最近打开任务卡片效果的自定义布局。
运行效果:
使用说明:
导入
repositories {
maven {
url "https://jitpack.io"
}
}
dependencies {
compile 'com.github.ZieIony:MaterialRecents:d2aec46f48'
}
使用
RecentsList recents = (RecentsList) findViewById(R.id.recents);
recents.setAdapter( new RecentsAdapter() {
@Override
public String getTitle(int position) {
return "Item " +position;
}
@Override
public View getView(int position) {
ImageView iv = new ImageView(RecentsActivity. this );
iv.setImageResource(R.drawable.mazda);
iv.setBackgroundColor(0xffffffff);
return iv;
}
@Override
public Drawable getIcon(int position) {
return getResources().getDrawable(R.mipmap.ic_launcher);
}
@Override
public int getHeaderColor(int position) {
return colors[random.nextInt(colors.length)];
}
@Override
public int getCount() {
return 10;
}