0

Noob question for all of you

So I have set up an ImageButton to my app but the problem is the white back ground of my picture clashes with the white default background of the android app. can someone please tell me the default hex color of an android background

alaboudi
  • 3,187
  • 4
  • 29
  • 47
  • I didn't get what you mean by `default hex color of an android background` ? – Shobhit Puri Sep 05 '13 at 21:45
  • it depends on the default theme your app uses! – moh.sukhni Sep 05 '13 at 21:47
  • Moh.Sukhni my theme is AppTheme – alaboudi Sep 05 '13 at 21:49
  • Shobhit Puri: hex colors are codes such as "#edd4434d" that specify a certain color. my button has a background but it contrasts really hard with the background of the app theme that im using. so i was wondering how to get the theme's background hex color so that i can remake a non clashing button – alaboudi Sep 05 '13 at 21:51

1 Answers1

0

There is no "default background" of an Android app. It all depends on the theme of the device.

You have 2 options:

1) Override the background of your app's activity to your own color or drawable. You can do this using the android:windowBackground attribute of your theme. See the docs. Example:

  <style name="MyTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    <item name="android:windowBackground">@drawable/grey_background_pattern</item>
</style>

2) You should be using transparent pixels in your image instead of white. This way your image will better fit with the other colors/backgrounds of your app.

Litrik De Roy
  • 823
  • 5
  • 9