zoukankan      html  css  js  c++  java
  • Android欢迎界面

    package edu.hpu.init;
    
    import android.app.Activity;
    
    import android.content.Intent;
    
    import android.os.Bundle;
    
    import android.os.Handler;
    
    import edu.hpu.logic.R;
    
    import edu.hpu.viewpager.MyViewPagerActivity;
    
    public class StartActivity extends Activity {
    
    	//延迟1秒 
    
        private static final long delayTime = 1000;
    
        @Override
    
        protected void onCreate(Bundle savedInstanceState) {
    
            super.onCreate(savedInstanceState);
    
            setContentView(R.layout.splash);
    
            // 使用Handler的postDelayed方法,3秒后执行跳转 
    
            new Handler().postDelayed(new Runnable() {
    
            	//必须加上StartActivity,否则默认是该Runable接口
    
                public void run() {
    
                	goHome();
    
                }
    
            }, delayTime);
    
            
    
        }
    
        private void goHome() {
    
    		Intent intent = new Intent(this, MyViewPagerActivity.class);
    
    		startActivity(intent);
    
    		this.finish();
    
    	}
    
    }
    

    <!-- 欢迎界面 -->
    
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    
        xmlns:tools="http://schemas.android.com/tools"
    
        android:layout_width="match_parent"
    
        android:layout_height="match_parent"
    
        tools:context=".StartActivity" >
    
        <ImageView
    
            android:layout_width="match_parent"
    
            android:layout_height="match_parent"
    
            android:adjustViewBounds="true"
    
            android:background="@drawable/logo"
    
            android:scaleType="centerCrop" />
    
    </RelativeLayout>
  • 相关阅读:
    通过 Ansible role 安装 Jenkins Server
    常见 Bash 内置变量介绍
    Ansible 简介
    为容器化的 Go 程序搭建 CI
    Bash Shebang 小结
    Docker Compose 引用环境变量
    Docker Compose 之进阶篇
    Docker Compose 原理
    WEB程序调用客户端程序
    读书笔记2014第5本:《乔纳森传》
  • 原文地址:https://www.cnblogs.com/hxsyl/p/3723992.html
Copyright © 2011-2022 走看看