Android逆向笔记-通过配置文件设置全屏(逆向开发与正向开发)

这里就是最简单的项目:

源码打包下载:

https://github.com/fengfanchen/AndroidReverse/tree/master/CrakDemo3

这里首先用逆向改配置文件,然后再回编译实现全屏界面的过程:

逻辑如下:

界面文件为AndroidManifest.xml

<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.example.crakdemo3" platformBuildVersionCode="30" platformBuildVersionName="11">
    <application android:allowBackup="true" android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:debuggable="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme">
        <activity android:name="com.example.crakdemo3.MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>
</manifest>

从上面的xml可以看到android:theme指向的是@style/AppTheme,这里从可以看到可以通过设置style的属性。完成全屏的操作

在res/values/styles.xml中可以看到:

在style name=""AppTheme"中新加:

<item name="android:windowFullscreen">true</item>

这样既可。

下面来说下正向开发

在同样的文件添加这个xml既可。

猜你喜欢

转载自blog.csdn.net/qq78442761/article/details/107140055