App crashing after theme update

自闭症网瘾萝莉.ら 提交于 2019-12-02 13:34:54

Put this code in your style.xml

<style name="AppTheme.NoActionBar">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
</style>

and don't add parent ="AppTheme" in the above code.

change your manifest file :

<activity android:name=".UserManagement.RegisterUserActivity"
        android:label="@string/app_name"
        android:theme="@style/AppTheme.AppBarOverlay">
</activity>

to this :

<activity android:name=".UserManagement.RegisterUserActivity"
            android:label="@string/app_name"
            android:theme="@style/AppTheme">
</activity>

i think your RegisterUserActivity problem will be solve...

UPDATE for your MainActivty Chnage style.xml

<!-- Base application theme. -->
<style name="AppTheme" parent="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>
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
</style>

It works with the following changes to the code:

<style name="AppTheme" 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>
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowFullscreen">true</item>
</style>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!