• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps using eclipse how do i change the background color

In the layout's XML you can set the property android:background to an RGB value like this "#ffff0000" which is an opaque red. But doing it that way kinda stinks.

You're better off defining your colors in a colors.xml file then adding resources and using the resources in your layout XML. This page describes it pretty well.

http://stackoverflow.com/questions/7478023/how-to-set-background-color-in-the-xml-layout



Oh yeah, I moved this thread to Application Development.
 
  • Like
Reactions: flyhigh427
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones