第二阶段冲刺第七天

 

这两天各科的实验报告跟作业很多 ,完成各科的实验报告,明天加油继续冲刺!!!!!

package com.example.myapplicationgb;
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.view.WindowManager;

import androidx.annotation.Nullable;

public class BaseActivity extends Activity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setTranslucent(this);
    }

    public static void setTranslucent(Activity activity) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            // 设置状态栏透明
            activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        }
    }
}

 

posted @ 2020-05-30 13:51  大米粒o  阅读(81)  评论(0编辑  收藏  举报