Set background colour java programming

Here is the block code which is set colour of any view background. it’s use hex code value to set color for example like “#ffffff” this is hex code of white colour.

Code

_view.setBackgroundColor(Color.parseColor(“hex code here”));

This code set the background color of any view. in this code replace _view to your view id. “hex colour code” replace with the hex code of colour what you want.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.