Projets
Voir sur GitHub 

JY39/GyroscopeImageDemo
À propos
Demo for Image auto sliding with GyroscopeSensor
Design et médiasProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalGyroscopeImageDemo
利用陀螺仪滑动图片的处理,以及针对陀螺仪图片控件的平滑转场动画。
我写了博客《陀螺仪图片控件 & 平滑转场动画的相关解析》,分享我的想法和思路。
欢迎讨论并提出您的宝贵建议。
Use GyroscopeImageView just like ImageView

在使用GyroscopeImageView控件时,若用 Picasso 加载图片 ,可利用 GyroscopeTransFormation, 传入控件的宽高即可合理地对图像尺寸做处理(当然你也可以自己处理图像的加载和图像的大小):
//用 Picasso加载图像 可将控件的宽高传入自定义的 TransFormation 来处理图像大小
Picasso.get()
.load(picUrl)
.transform(new GyroscopeTransFormation(width, height))
.into(gyroscopeImageView);
Register the GyroscopeManager in related Activity
在相关Activity的onResume和onPause中对陀螺仪传感器进行注册和注销监听:
@Override protected void onResume() {
super.onResume();
//利用我们的 GyroscopeManager 来注册传感器监听
GyroscopeManager.getInstance().register(this);
}
@Override protected void onPause() {
super.onPause();
//利用我们的 GyroscopeManager 来注销监听
GyroscopeManager.getInstance().unregister(this);
}
Smoothly Transfer

平滑转场:
CoverActivity.startActivityWithAnimation(ImageMoveActivity.this, PIC_URL, gyroscopeImageView);
Found this project useful
:heart: Hope this article can help you. Support by clicking the :star:, or share it with people around you. :heart:
About me
email : [email protected]
blog : jiangye
Explorer des projets similaires
Chargement…