1. Are you ready for the Galaxy S20? Here is everything we know so far!

using eclipse how do i change the background color

Discussion in 'Android Development' started by flyhigh427, Jul 2, 2013.

  1. flyhigh427

    flyhigh427 Member
    Thread Starter

    hi how do i change the layout background color?
    there doesnt seem to be a way
    thanks
     



    1. Download the Forums for Android™ app!


      Download

       
  2. RichSz

    RichSz Not Entitled

    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.
     
    flyhigh427 likes this.
  3. out of ideas

    out of ideas Android Enthusiast

    Are you talking about an app layout or the layout in eclipse?

    eclipse has theme in the preferences sections. I switched to the black background and its MUUUUUCH easier on the eyes after a few hours.
     
  4. flyhigh427

    flyhigh427 Member
    Thread Starter

    found the answer finaly >>>how to set the THEME theres a button right above the layout ,,lol ive been tring to change it by changing the back ground color.
    thanks all
     
  5. flyhigh427

    flyhigh427 Member
    Thread Starter

    i guess black saves on battery life ,right?
     
Loading...

Share This Page

Loading...