Reputation: 6912
Whie I set activity theme to light.
android:theme="@android:style/Theme.Light.NoTitleBar"
And I set layout background to 0x000000.
It will display gray.
How to make it to black?
I set below line to color.xml.
#000000
And set as below:
ll.setBackgroundColor(R.color.black);
ll is LinearLayout.
Upvotes: 1
Views: 15076
Reputation: 16398
You should use #ff000000
instead of #000000
. Try this:
//Try one of these lines:
ll.setBackgroundColor(Color.parseColor("ff000000"));
ll.setBackgroundColor(Color.BLACK);
//Or change your color.xml value to #ff000000 and use
ll.setBackgroundColor(R.color.black);
Upvotes: 7