我曾在我的活动中使用Theme.AppCompat.Light.NoActionBar,这个主题可以完美地运行,但是我不得不迁移到 Androidx 来使用一个库,在迁移后现在出现了一个 actionBar。
我试着搜索了一些解决方案,但没有找到任何有效的方法。
以下是我的代码:
Style.xml
<style name="NoActionBar" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
Manifest.xml
<activity android:name=".LoginActivity" android:theme="@style/NoActionBar"
android:configChanges="orientation" android:screenOrientation="portrait"/>