【边做项目边学Android】手机安全卫士02:splash界面ui

手机安全卫士项目是跟着黑马的视频做的。

splash是飞洒、飞溅的意思,主要是用于完成一个产品logo显示,期间可以:

  1. 后台完成数据库初始化的操作
  2. 联网访问服务器,获取服务器最新信息(升级提示)
  3. 不同的日期显示出来不同logo,判断当前系统时间,素材一般从服务器上下载下来.
  4. 判断时间,根据不同时间显示不同的加载页面

布局文件:splash.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/logo2"
    android:gravity="center_horizontal"
    android:orientation="vertical"
    android:id="@+id/ll_splash_main"
    >
    <TextView
        android:layout_marginTop="320dip"
        android:id="@+id/tv_splash_version"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#FFff5f00"
        android:textSize="20sp"
        android:text="版本号"  
        />
   
    <ProgressBar
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dip"
        />

</LinearLayout>


activity:SplashActivity

package com.liuhao.mobilesafe.ui;

import com.liuhao.mobilesafe.R;

import android.os.Bundle;
import android.app.Activity;
import android.content.pm.Packag
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值