Skip to content
This repository was archived by the owner on Nov 22, 2021. It is now read-only.
This repository was archived by the owner on Nov 22, 2021. It is now read-only.

android-lint:Overdraw FP? #27

Description

@alixwar

I'm getting the following violation:
"Possible overdraw: Root element paints background @color/colorPrimary with a theme that also paints a background (inferred theme is @style/AppTheme_NoActionBar)"

Note: I added "@null" to the theme in the hope that it would fix the issue but it's the same situation with and without this row.

My setup:
Android plugin version 1.1

Relevant part of my code below:

styles.xml:

    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="android:background">@null</item>
        <item name="android:textColorSecondary">@color/white</item>
    </style>

AndroidManifest.xml:

        <activity
                android:label=""
                android:name=".accounts.AccountHandlingActivity"
                android:screenOrientation="portrait"
                android:theme="@style/AppTheme.NoActionBar"
                android:windowSoftInputMode="adjustResize|stateHidden"
                >

activity_account_handling.xml:
Note: the violation is on the row which sets "android:background":

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:app="http://schemas.android.com/apk/res-auto"
                xmlns:tools="http://schemas.android.com/tools"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/colorPrimary"
                android:fitsSystemWindows="true"
        >

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions