Notice: 函数 WP_Scripts::localize 的调用方法不正确$l10n 参数必须是一个数组。若要将任意数据传递给脚本,请改用 wp_add_inline_script() 函数。 请查阅调试 WordPress来获取更多信息。 (这个消息是在 5.7.0 版本添加的。) in /data/www/appblog/wp-includes/functions.php on line 6131

Android Activity设置全屏显示

代码中设置

requestWindowFeature(Window.FEATURE_NO_TITLE); //隐藏标题
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
    WindowManager.LayoutParams.FLAG_FULLSCREEN); //设置全屏

setContentView(R.layout.activity_main);

注意:setContentView一定要写在设置全屏后边

AndroidManifest.xml文件中设置

<application
    android:allowBackup="true"
    android:icon="@drawable/icon"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    android:name="com.scwindow.utility.CrashApplication">

在styles.xml文件中定义主题AppTheme

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
    <!-- All customizations that are NOT specific to a particular API-level can go here. -->
    <item name="android:windowNoTitle">true</item>    
    <item name="android:windowFullscreen">true</item>   
    <item name="android:windowIsTranslucent">true</item>
</style>
上一篇 Android SpannableString属性详解
下一篇 Android设置EditText光标位置、粗细颜色