设置APP全屏无标题

1、修改styles.xml文件

    

2、修改AndroidManifest.xml下application节点

 
.....

3、修改BaseActivity

public abstract class BaseActivity extends AppCompatActivity

    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //设置标题栏
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        //设置状态栏
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,          
        WindowManager.LayoutParams.FLAG_FULLSCREEN);
        //设置布局
        setContentView(intiLayout());
        ......

 

你可能感兴趣的:(android)