Android的材质动画闪屏像Palabre应用 [英] Android Material Animation with Splash Screen like Palabre Application
问题描述
下面是 Palabre
视图的闪屏:
https://play.google.com/store/应用程序/详细信息?ID = com.levelup.palabre
正如我们所看到的,在应用程序的启动,有一个与图像动画闪屏。
As we can see, at the start of application, there is a SplashScreen with image Animation.
这里是我想要实现这个美丽:):
And here is what i'm trying to achieve this beauty :) :
<?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有一个完整的画面view.So,
And this SplashActivity have a full screen view.So,
如何我们可以将这个形象酷似 Palabre
在左边还是右边?
什么是图像的大小,在这个屏幕?
How we can move this image exactly like Palabre
on the left or right?
and what is the size of Image at this Screen?
编辑:
此外,我发现这个全屏ImageView的: 在您的布局:
also i found this for full screen imageview: in your layout:
android:scaleType = "centerCrop"
和我们需要添加动画到这个ImageView的?
and what we need to add animation to this imageview?
感谢
推荐答案
我发现它finally.It的美丽:) 只需添加依赖:
I found it finally.It's beautifull :) just add the dependency:
compile 'com.flaviofaria:kenburnsview:1.0.6'
和
XML布局:
<com.flaviofaria.kenburnsview.KenBurnsView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/img"
android:scaleType = "centerCrop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/splash" />
Github上: https://github.com/flavioarfaria/KenBurnsView
由于弗拉维奥法利亚这个好的库。
thanks to Flávio Faria for this good library.
这篇关于Android的材质动画闪屏像Palabre应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!