ImageCoverFlow
==============
### To show coverflow effect on android
ImageCoverFlow is an Open Source Android library that allows developers to easily create applications with coverflow effect to show image.This lib is not extends Gallery. Feel free to use it all you want in your Android apps provided that you cite this project and include the license in your app. (Looping mode has already supported, non-looping mode will be supported later)
![Opps! Screen shot has missed](https://github.com/dolphinwang/ImageCoverFlow/raw/master/imagecoverflow_screenshot.png)
### ImageCoverFlow is currently used in some published Android apps. Here's a list of some of them:
1. [ICardEnglish](https://play.google.com/store/apps/details?id=com.cn.icardenglish&hl=zh_CN)</br >
How to use:
-----------------------------------
### Step one:add it to ur project
1. by xml
<com.dolphinwang.imagecoverflow.CoverFlowView
xmlns:imageCoverFlow="http://schemas.android.com/apk/res-auto"
android:id="@+id/coverflow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="20dp"
android:paddingRight="20dp"
imageCoverFlow:coverflowGravity="center_vertical"
imageCoverFlow:coverflowLayoutMode="wrap_content"
imageCoverFlow:enableReflection="true"
imageCoverFlow:reflectionGap="10dp"
imageCoverFlow:reflectionHeight="30%"
imageCoverFlow:reflectionShaderEnable="true"
imageCoverFlow:visibleImage="5" >
</com.dolphinwang.imagecoverflow.CoverFlowView>
2. by java code:
CoverFlowView<MyCoverFlowAdapter> mCoverFlowView=(CoverFlowView<MyCoverFlowAdapter>)findViewById(R.id.coverflow);
mCoverFlowView.setCoverFlowGravity(CoverFlowGravity.CENTER_VERTICAL);
mCoverFlowView.setCoverFlowLayoutMode(CoverFlowLayoutMode.WRAP_CONTENT);
mCoverFlowView.enableReflection(true);
mCoverFlowView.setReflectionHeight(30);
mCoverFlowView.setReflectionGap(20);
mCoverFlowView.enableReflectionShader(true);
mCoverFlowView.setVisibleImage(5);
tips:If u want to support different move speed on different density of screens,
u can call method setScreenDensity to set screen density. Or coverflow
will have unified move speed.
### Step two:then you should give an adapter to it which extends CoverFlowAdapter:
MyCoverFlowAdapter adapter = new MyCoverFlowAdapter(this);
mCoverFlowView.setAdapter(adapter);
tips:
1. method setAdapter should be called after all of properties of coverflow are setted。
2. if want to load image dynamic, u can call methos invalidatePosistion when bitmap loaded.
### Step three:if u want to listen click event of top image, u can set CoverFlowListener to it.
mCoverFlowView.setCoverFlowListener(new CoverFlowListener<MyCoverFlowAdapter>() {
@Override
public void imageOnTop(CoverFlowView<MyCoverFlowAdapter> view,
int position, float left, float top, float right,float bottom) {}
@Override
public void topImageClicked(CoverFlowView<MyCoverFlowAdapter> view, int position){}
});
### if u want to listen long click event of top image, u can set TopImageLongClickListener to it.
mCoverFlowView
.setTopImageLongClickListener(new CoverFlowView.TopImageLongClickListener() {
@Override
public void onLongClick(int position) {
Log.e(VIEW_LOG_TAG, "top image long clicked == >"
+ position);
}
});
### Users can use method setSelection to show image of right position on top.
If u write a class extends CoverFlowView:
-----------------------------------
1. You can override method getCustomTransformMatrix to make more transform to image.
(There are some annotation code in it shows how to make image y-axis rotation).
2. You should never override method onLayout to layout any of CoverFlowView’s children,
because all of image will draw on the canvas directly.
### Developed by:
Roy Wang (dolphinwang@foxmail.com)
If you use this lib. Please let me know.
### License:
Copyright 2013 Roy Wang
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
ImageCoverflow效果 (138个子文件)
resources.ap_ 164KB
ImageCoverflowDemo.apk 395KB
ImageCoverflowDemo.apk 395KB
jarlist.cache 120B
jarlist.cache 120B
CoverFlowView.class 22KB
MainActivity.class 3KB
CoverFlowView$RecycleBin.class 3KB
BitmapUtils.class 2KB
CoverFlowView$RecycleBin$1.class 2KB
CoverFlowView$LongClickRunnable.class 1KB
CoverFlowView$CoverFlowGravity.class 1KB
CoverFlowAdapter.class 1KB
CoverFlowView$CoverFlowLayoutMode.class 1KB
MainActivity$MyCoverFlowAdapter.class 1023B
R$styleable.class 949B
R$styleable.class 949B
R$styleable.class 937B
MainActivity$1.class 838B
R.class 803B
R$attr.class 739B
CoverFlowView$1.class 726B
CoverFlowView$CoverFlowListener.class 682B
R.class 679B
R.class 679B
R$id.class 651B
R$attr.class 635B
R$attr.class 635B
R$id.class 591B
R$drawable.class 568B
R$id.class 558B
R$string.class 508B
R$dimen.class 498B
R$dimen.class 497B
R$drawable.class 492B
R$style.class 484B
R$style.class 467B
R$dimen.class 449B
R$drawable.class 443B
R$layout.class 439B
R$style.class 435B
BuildConfig.class 369B
BuildConfig.class 369B
CoverFlowView$TopImageLongClickListener.class 302B
.classpath 555B
.classpath 466B
classes.dex 699KB
.DS_Store 6KB
ImageCoverFlow-master.iml 1KB
ImageCoverflowDemo.iml 1KB
android-support-v4.jar 384KB
android-support-v4-ff9a0b5b3e761b38e4b90e1747712905.jar 335KB
android-support-v7-appcompat-348c4e6e66973856c6f073f2a7a07009.jar 201KB
android-support-v4-283f427e770e537308a4baf63432ea19.jar 148KB
yPush-com.example.imagecoverflowdemo-1.2.5-758252f41622555b106c2f310dd7604f.jar 98KB
ySpot-com.example.imagecoverflowdemo-1.1.8.jar 67KB
ySpot-com.example.imagecoverflowdemo-1.1.8-4a619a2fc0ae9182510d40991aedc635.jar 66KB
imagecoverflow-master.jar 20KB
imagecoverflow-master-c96f72c1b418e5cae73118a99ff5afad.jar 13KB
imagecoverflow-master-3b3d5a68c1be31cf3a0b32f5842d0c99.jar 13KB
android-support-v7-appcompat-6637f155266c0da03543a1b3ed7fb37f.jar 166B
CoverFlowView.java 33KB
R.java 12KB
R.java 10KB
BitmapUtils.java 3KB
MainActivity.java 2KB
R.java 2KB
CoverFlowAdapter.java 1KB
BuildConfig.java 172B
BuildConfig.java 172B
c.JPG 27KB
d.JPG 26KB
e.JPG 25KB
b.JPG 24KB
a.JPG 20KB
README.md 5KB
.name 18B
ic_launcher-web.png 50KB
ic_launcher-web.png 50KB
ic_launcher.png 24KB
ic_launcher.png 24KB
ic_launcher.png 18KB
ic_launcher.png 17KB
ic_launcher.png 12KB
ic_launcher.png 12KB
ic_launcher.png 9KB
ic_launcher.png 9KB
ic_launcher.png 8KB
ic_launcher.png 7KB
ic_launcher.png 6KB
ic_launcher.png 6KB
ic_launcher.png 4KB
ic_launcher.png 4KB
ic_launcher.png 3KB
ic_launcher.png 3KB
org.eclipse.jdt.core.prefs 177B
org.eclipse.core.resources.prefs 57B
org.eclipse.core.resources.prefs 57B
.project 857B
.project 854B
共 138 条
- 1
- 2
资源评论
A一剑飞鸿
- 粉丝: 847
- 资源: 52
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功