3D相册(3D + 倒影效果)源代码
来源:互联网 发布:绘图软件spaceman 编辑:程序博客网 时间:2024/05/17 02:48
3D相册(Gallery 3D + 倒影效果) GalleryFlow 源代码
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package
com.image.galleryFlow;
import
android.app.Activity;
import
android.os.Bundle;
import
android.view.GestureDetector;
import
android.view.GestureDetector.SimpleOnGestureListener;
import
android.view.MotionEvent;
public
class
GalleryFlowActivity
extends
Activity {
private
GalleryFlow galleryFlow;
private
ImageAdapter adapter;
private
GestureDetector detector;
/** Called when the activity is first created. */
@Override
public
void
onCreate(Bundle savedInstanceState) {
super
.onCreate(savedInstanceState);
setContentView(R.layout.layout_gallery);
detector =
new
GestureDetector(
new
MyGestureListener());
int
[] images = { R.drawable.p01, R.drawable.p02, R.drawable.p03,
R.drawable.p04, R.drawable.p05 };
adapter =
new
ImageAdapter(
this
, images);
adapter.createReflectedImages();
galleryFlow = (GalleryFlow) findViewById(R.id.gallery_flow);
galleryFlow.setAdapter(adapter);
galleryFlow.setSelection(
1
);
}
private
class
MyGestureListener
extends
SimpleOnGestureListener {
@Override
public
boolean
onFling(MotionEvent e1, MotionEvent e2,
float
velocityX,
float
velocityY) {
// TODO Auto-generated method stub
int
currentPosition = galleryFlow.getSelectedItemPosition();
if
(e1.getX() - e2.getX() >
50
&& Math.abs(velocityX) >
100
) {
if
(currentPosition +
1
== adapter.getCount()) {
galleryFlow.setSelection(
0
);
}
else
{
galleryFlow.setSelection(currentPosition +
1
);
}
}
else
if
(e2.getX() - e1.getX() >
50
&& Math.abs(velocityX) >
100
) {
if
(currentPosition -
1
<
0
) {
galleryFlow.setSelection(adapter.getCount() -
1
);
}
else
{
galleryFlow.setSelection(currentPosition -
1
);
}
}
return
super
.onFling(e1, e2, velocityX, velocityY);
}
}
@Override
public
boolean
onTouchEvent(MotionEvent event) {
// TODO Auto-generated method stub
return
detector.onTouchEvent(event);
}
}
20121014145 102_99011.png(116.56 KB, 下载次数: 26)
3D相册(Gallery 3D + 倒影效果) GalleryFlow 源代码 http://yuncode.net/code/c_507a610da229d27 ...
20121014145050_71959.png(100.57 KB, 下载次数: 1)
3D相册(Gallery 3D + 倒影效果) GalleryFlow 源代码 http://yuncode.net/code/c_507a610da229d27 ...
GalleryFlow.rar
- 3D相册(3D + 倒影效果)源代码
- 3D效果Android相册 倒影效果
- 3D效果相册
- 3D相册旋转效果
- 3D相册图片滑动+倾斜+放大+倒影处理
- 3d相册弹出效果01
- 3d相册弹出效果02
- android之向Gallery中添加倒影3D效果
- 自定义ScrollView实现gallery3D效果,3D相册效果
- html5 3d相册
- <<web>>3d 相册
- 3D相册旋转
- 3D旋转相册
- 3D旋转相册
- CSS3 3D相册
- canvas极速3D立体式图片相册切换效果
- 3d循环倒影gallery组件
- android 动态向Gallery中添加图片及倒影&&3D效果
- Java基础复习:Random类与UUID类
- oracle11g从11.2.0.3.0升级到11.2.0.3.6操作步骤(二)
- 根文件系统及Busybox简介
- Sql语句查询精选
- Iphone 开发环境
- 3D相册(3D + 倒影效果)源代码
- mybatis异常
- linux ,Android基础知识总结
- Android --- 斗地主 [牌桌实现源码] !!!!!!!!!!!!!!!!!!
- Extjs PagingToolbar下拉框分页插件 Ext.ux.ComboPageSize
- JQuery插件第三十五个:在指定范围内水平垂直居中浮动层
- android thread实例
- Android设备驱动之——V4L2
- java 大数据处理