package com.ysnows.update.base;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Window;

import androidx.annotation.Nullable;

/**
 * Created by shihuiyun
 * on 2019-12-04
 */
public abstract class UpgradeActivity extends Activity {

    public abstract int getLayoutId();

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);//竖屏
        setContentView(getLayoutId());
        initView();
        initData();


    }


    protected abstract void initView();

    protected abstract void initData();


}
