This repository was archived by the owner on Nov 22, 2021. It is now read-only.
forked from peter-budo/sonar-android-lint-plugin
-
Notifications
You must be signed in to change notification settings - Fork 63
This repository was archived by the owner on Nov 22, 2021. It is now read-only.
android-lint:Overdraw FP? #27
Copy link
Copy link
Open
Description
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"
>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels