【开源】ParallaxImageView
ParallaxImageView
- https://github.com/irimiaionut/ParallaxImageView
介绍:
ParallaxImageView可以根据手机的旋转改变自己的位置,从而制造出深度效果,类似于Amazon FirePhone 。运行效果:
![]()
使用说明:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_margin="0dip" tools:context="com.example.sensortest.MainActivity" > <com.android.irimiaionut.parallaxImageView.ParallaxImageView android:id="@+id/backgr" android:src="@drawable/backgr" android:layout_height="fill_parent" android:layout_width="fill_parent" android:scaleType="centerCrop" android:adjustViewBounds="true"/></RelativeLayout> |
|
1
2
3
|
backgr = (ParallaxImageView) findViewById(R.id.backgr);backgr.setMargins(300, 200);backgr.setMultipliers(1.5f, 1.7f); |
posted on 2015-04-08 09:43 wasdchenhao 阅读(174) 评论(0) 收藏 举报

浙公网安备 33010602011771号