zoukankan      html  css  js  c++  java
  • android studio IDE 下,设置ACTIVITY全屏

    因为ANDROID STUDIO的JAVA类是继承AppCompatActivity的 ,所以常规的全屏设置并不管用。如果要设置全屏,请参照如下代码/

    1/首先,打开AndroidManifest.xml文件添加代码“android:theme="@style/AppTheme"”这个属性,这个APPTHRME是自定义属性,其整个XML代码如下

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="entss.ent.core.apps.unisi.com.myapplication">
    
        <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">
            <activity android:name=".SplashActivity">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
            <activity android:name=".MainActivity"></activity>
        </application>
    
    </manifest>

    2/设置STYLE属性

    <resources>
        <!-- Base application theme. -->
        <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
            <!-- #region /设置全屏属性-->
            <item name="android:windowFullscreen">true</item>
            <!--#endregion -->
            <item name="colorPrimary">@color/colorPrimary</item>
            <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
            <item name="colorAccent">@color/colorAccent</item>
        </style>
    </resources>

    OK,如上配置后运行APPS就可以看到全屏了。

  • 相关阅读:
    redis基本数据结构-集合set
    redis基本数据结构-列表
    redis基本数据结构-散列
    redis基本数据结构-字符串
    redis基础
    关于HTTP调用WCF传递DataTable参数的处理
    解决WCF跨域问题,及DataTable参数问题
    让WCF支持Http调用
    分页方法,始终只生成指定数量的页码
    CVE-2021-1675漏洞复现
  • 原文地址:https://www.cnblogs.com/fan-yuan/p/5105190.html
Copyright © 2011-2022 走看看