
这是Palabre的SplashScreen视图:
https://play.google.com/store/apps/details?id=com.levelup.palabre
我们可以看到,在应用程序开始时,有一个带有图像动画的SplashScreen.
这就是我想要实现这个美丽:):
<?xml version="1.0" enCoding="utf-8"?><relativeLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:layout_wIDth="match_parent" androID:layout_height="match_parent"> <ImageVIEw androID:ID="@+ID/imglogo" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_centerInParent="true" androID:src="@drawable/grand_canyon"/></relativeLayout>结果:
这个SplashActivity有一个全屏视图.所以,
我们如何能够像左边或右边的Palabre一样移动这个图像?
这个屏幕上Image的大小是多少?
编辑:
我也发现这是全屏imagevIEw:
在你的布局中:
androID:scaleType = "centerCrop"以及我们需要为此imagevIEw添加动画?
谢谢
解决方法:
我认为通过Scale和TranslateAnimation的混合你可以做到这一点.
另一种选择是使用AnimationSet(http://developer.android.com/reference/android/animation/AnimatorSet.html)
编辑:以下是ObjectAnimator的一些示例,其中包含几个动画,其中myVIEw是您要设置动画的视图.检查此链接以获取动画属性(rotationX,rotationY等)http://developer.android.com/guide/topics/graphics/prop-animation.html#views的说明
AnimatorSet animset = new AnimatorSet(); animset.playTogether( ObjectAnimator.offloat(myVIEw, "rotationX", 0, 360), ObjectAnimator.offloat(myVIEw, "rotationY", 0, 180), ObjectAnimator.offloat(myVIEw, "rotation", 0, -90), ObjectAnimator.offloat(myVIEw, "translationX", 0, 90), ObjectAnimator.offloat(myVIEw, "translationY", 0, 90), ObjectAnimator.offloat(myVIEw, "scaleX", 1, 1.5f), ObjectAnimator.offloat(myVIEw, "scaleY", 1, 0.5f), ObjectAnimator.offloat(myVIEw, "Alpha", 1, 0.25f, 1) ); animset.setDuration(5000).start();还要检查我是否以毫秒为单位指定了动画的持续时间.
如果您的目标API低于11,请检查http://nineoldandroids.com/以在较旧的机器人上使用AnimatorSet.
希望这对你有所帮助.
总结以上是内存溢出为你收集整理的像Palabre应用程序一样的Android材质动画与启动画面全部内容,希望文章能够帮你解决像Palabre应用程序一样的Android材质动画与启动画面所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)