设置Activity全屏的三种方式
1、代码中设置
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);注意: 在setContentView 之前调用
2、manifest中设置
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
或者
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
3、style中设置
定义自己的主题:
<style name="MyTheme">
        <item name="android:windowNoTitle">true</item>//无标题
        <item name="android:windowActionBar">false</item>//无ActionBar
        <item name="android:windowFullscreen">true</item>//全屏即无通知栏
        <item name="android:windowContentOverlay">@null</item>//是否有遮盖
 </style>
Studio3.0 布局不能显示问题
错误信息:
Failed to load AppCompat ActionBar with unknown error.
修改:
styles.xml文件
parent = "Theme.AppCompat.Light.DarkActionBar"
改为:
parent = "Base.Theme.AppCompat.Light.DarkActionBar"
<!-- Base application theme. -->
    <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>
显示正常。