Help me with this , cannot set color

+1 LK Karthikeya · December 11, 2015
/images/forum/upload/2015-12-11/16e99a85f999dad4c361e02b0fe25c2a.png

Post a Reply

Replies

Oldest  Newest  Rating
+1 Gary Whitney · December 12, 2015
Try changing color. GREEN to Color.GREEN to reference the Java Class Color.
0 visakh vijayakumar · December 12, 2015
setContentView(R.layout.layout_example);

//Set an id  for  layout
RelativeLayout  sample =  (RelativeLayout) findViewById(R.id.main_layout);


sample.setBackgroundColor(Color.RED);
  • 1

Java / Android Development

107,260 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator