setBackgroundColor android code example
Example 1: android studio set background color
YourView.setBackgroundColor(Color.argb(255, 255, 255, 255));
Example 2: android studio setbackground
RelativeLayout layout =(RelativeLayout)findViewById(R.id.background);
layout.setBackgroundResource(R.drawable.ready);
Example 3: setbackground color hexadecimal android
view.setBackgroundColor(0x00FF00)