Android set Background Color of view

w‮ual.ww‬tturi.com
Android set Background Color of view
//set background color

view1.setBackgroundColor(0x00F0F0);

//set background drawable 
RelativeLayout layout =(RelativeLayout)findViewById(R.id.background);
layout.setBackgroundResource(R.drawable.ready);
Created Time:2017-10-08 22:21:16  Author:lautturi