简体   繁体   中英

Color value not valid — must be #rgb, #argb, #rrggbb, or #aarrggbb

I am giving a colour code in textColour attribute in xml file.

ie android:textColor="#fffffffff"

I am getting this error: Error: Color value not valid -- must be #rgb, #argb, #rrggbb, or #aarrggbb (at 'textColor' with value '#fffffffff').

Still the colour is converting to black in layout.

Although I have got that the color code is not valid, it sholud be "#ffffffff"(White), but if it is not valid then why it is converting to black? What is happenig exactly?

You have nine f characters there instead of eight, which is why it's complaining. It's probably going to black because it fails validation and the default value is zero.

To Use transparent Color You Need To Replace #00000000 instead of #FFFFFFFFF

To Fix Error :-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM