(1)创建一个工程
(2)将欢迎界面所需的图片导入到drawable文件夹中(这里我的背景图为launch_bg)
(3)创建一个欢迎的activity界面(这里我创建的命名为SplashActivity)
(4)欢迎界面布局文件代码(activity_splash.xml):
注意:使用的是相对布局 <TextView>标签用于显示应用版本信息
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/launch_bg">
<TextView
android:id="@+id/tv_version"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:textColor="@android:color/background_dark"
/>
</RelativeLayout>