0

I am using Eclipse ADT to develop my first Android application.

In Eclipse you can change the theme using the menu shown in the Graphical Layout window. I decided to use the Black theme because I like the way the UI components look using that theme.

select theme

One of my UI widgets is a seek bar. Here is how it looks using the Black theme:

seek bar black theme

When I test (run) my application using the Nexus S virtual device the seek bar looks different:

seek bar nexus s

Why do they look different? (I am guessing that Eclipse is just showing me a preview of what that theme would look like and not actually setting it anywhere and that when I run my app it inherits the theme from the target platform.) Is there a way I can force the look and feel of my app?

Thank you.

Jan Tacci
  • 3,131
  • 16
  • 63
  • 83

2 Answers2

1

Because the Android UI has evolved and changed. The first image you posted is Android 2.2 (ish) and then the second image looks like Android >= 4.0.

Secondly, AFAIK, changing the theme from that menu is ONLY for checking out the apps UI within the GUI layout editor - it will not change the theme on launch within the emulator, or a real device. For that you need to specify the theme within your manifest.

You can change the version of Android being used in the preview too, using the Android icon on the far right of the GUI editor. You can also preview more than one at a time using the far left icon on the same toolbar.

Rawkode
  • 21,990
  • 5
  • 38
  • 45
  • So I assume Eclipse is just showing me a preview of the Black theme and when I run my application the look and feel is inherited from the Android version of the target platform. What if I like the way the widgets looks on the Black theme is there a way to force the look and feel? – Jan Tacci Feb 27 '13 at 17:17
  • So I can change my apps look and feel by just setting the android version? – Jan Tacci Feb 27 '13 at 17:20
  • Only in the preview. You can't effect the look of the app across all phones and versions, unless you look into Holo Everywhere, as suggested by Paul in his answer. – Rawkode Feb 27 '13 at 17:21
  • One other quick thing... In general, do people use images, custom widgets, etc. to get their app to look different than the standard Android look-and-feel? – Jan Tacci Feb 27 '13 at 17:35
  • Images are definitely used a lot. You can check for yourself though. Copy an APK to your laptop/desktop and unzip it. You'll have access to some resources and you'll be able to piece together what they're doing – Rawkode Feb 27 '13 at 17:37
1

What Rawkode said.

I'll add my two cents:

You can take a look at the HoloEverywhere project if you want to have a consistantly looking application across all Android versions.

The project is essentially a backport of the Holo theme for Android pre 4.0.

You can check it out here: http://www.holoeverywhere.com/

Paul
  • 5,163
  • 3
  • 35
  • 43