之前一直很喜欢Lofter的启动画面,今天刚好项目需要,自己尝试用自己的方式去实现,代码相对比较简单,并没有复杂的地方,这里就直接po上代码了,也不多讲解了,这个估计一看就懂了的。当然没纠结在布局上,所以,不是很认真的在布局上下工夫,实现功能为主:
XML布局代码如下:
splash.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#D30F11" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/layout_firstIn"
android:layout_width="match_parent"
android:layout_height="120dp"