Niko
Niko

Reputation: 8163

Android 4.1.2 platform messing with background color

I am facing very weird issue with 4.1.2 platform. My LinearLayout has following background set in xml:

 android:background="@android:color/white"

I am using LayoutInflater to inflate the layout.

On Samsung S3 the result is nothing but white, seems to be closer to gray.

I am using minSdk 10 and targetSdk 20, building the project using sdk 18.

Anyone else encountered the same or similar issue and got some insight how to fix/workaround?

Thanks.

Upvotes: 1

Views: 259

Answers (2)

Bhuvnesh
Bhuvnesh

Reputation: 1055

Use white colour hex code #ffffff instead of referencing("@android:color/white").

Hope it may helpful to you.

Thanks,

Bhuvnesh

Upvotes: 0

Niko
Niko

Reputation: 8163

Workaround is to call setBackgroundColor in java code. Not pretty, but works.

Upvotes: 1

Related Questions