Pedro Rainho
Pedro Rainho

Reputation: 4294

Background with wrong color

I've create a demo app to test my problem and this is my layout

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#1e1c1c">

</RelativeLayout>

The only thing i've added was the background. Now the question, running this layout the background is not #1e1c1c but #181c18, why is this happening?

How can I fix this?

Thanks

Upvotes: 0

Views: 502

Answers (2)

Ramesh
Ramesh

Reputation: 21

I suggest you create a shape and set the solid color and use that as background.

Upvotes: 2

asenovm
asenovm

Reputation: 6517

Try with: android:background="#ff1e1c1c" Maybe it has to do with the fact the you have not set the alpha byte, and by default it may not be FF(although I doubt it, but I see no other logical reason).

Upvotes: 0

Related Questions