zoukankan      html  css  js  c++  java
  • 每日学习

    今天准备开始做团队作业。

    首先做的是进入app时的动画页面:

    动画页面布局

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@mipmap/first"
            />
    </RelativeLayout>

     java代码:

    package com.example.bowenwang;
    
    import androidx.annotation.RequiresApi;
    import androidx.appcompat.app.AppCompatActivity;
    
    import android.content.Intent;
    import android.graphics.Color;
    import android.os.Build;
    import android.os.Bundle;
    import android.view.View;
    import android.view.WindowManager;
    
    import java.util.Timer;
    import java.util.TimerTask;
    
    public class firstActivity extends AppCompatActivity {
    
        @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_first);
    
            this. getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                    WindowManager.LayoutParams.FLAG_FULLSCREEN);
            Timer timer = new Timer();
            TimerTask task = new TimerTask() {
                @Override
                public void run() {
                    Intent intent = new Intent(firstActivity.this, MainActivity.class);
                    startActivity(intent);
                    firstActivity.this.finish();
                }
            };
            getWindow().setStatusBarColor(Color.TRANSPARENT);
            getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
            timer.schedule(task, 3000);
        }
    }
    
    作者:哦心有
    本文版权归作者和博客园共有,欢迎转载,但必须给出原文链接,并保留此段声明,否则保留追究法律责任的权利。
  • 相关阅读:
    让iis支持中文文件名(转)
    为你的mail server增加SPF记录
    sql清除事务日志命令
    收集的ASP.NET中常用正则表达式
    在线支付类封装
    提供一个操作Windows服务类库(基本函数)
    简单测试Newtonsoft.json JObject内存占用分配
    图片和文字同行 对齐方式
    常用的css(持续跟新中....)
    Effective Ways to Develop Web Part
  • 原文地址:https://www.cnblogs.com/haobox/p/14911182.html
Copyright © 2011-2022 走看看