Android 1.5 SDK and setTheme problem

by Rmac » Wed, 29 Apr 2009 05:56:21 GMT


Sponsored Links
 Before I report this as a bug, has anyone been able to set a theme in
1.5?  What worked in 1.1 no longer does in 1.5 for setting themes.
For example the following:

 protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ...
    setTheme(android.R.style.Theme_Light);
    setContentView(R.layout.linear_layout_3);
}

doesn't seem to work unless you move the setTheme before
super.onCreate like this:

 protected void onCreate(Bundle savedInstanceState) {
    setTheme(android.R.style.Theme_Light);
    super.onCreate(savedInstanceState);
    ...
    setContentView(R.layout.linear_layout_3);
}

Is this the way themes have to be set or is it a 1.5 bug?
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. fillpolygon for drawing on a Canvas?

Hi all,

It seems a bit odd to me that there is no fillpolygon(...) method in
the Canvas class?

I'm a bit new to graphics on Android, but it seems I must be missing
something here?

There's a drawLines(...) but it appears that it doesn't do 'fill'.

I.e. The best I can make out is that I'll have to write my own version
of a fillpolygon (which is a very standard sort of need), using a Path
and moveto() and many lineto()s and drawPath???

Am I heading down the right track, or have I missed some 'really
obvious' method that is named something entirely different from
fillpolygon but does the same thing?

Thanks in advance for any help:)

--~--~---------~--~----~------------~-------~--~----~

2. problem with getId()



Perhaps you are using an ArrayAdapter, which does not have IDs.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Development Wiki: http://wiki.andmob.org

--~--~---------~--~----~------------~-------~--~----~

3. Can the "same" LinearGradient-object be shared across multiple Paint::setShader() calls?

4. populate a database

5. File Association

6. fillpolygon for Canvas?

7. Checkout SoundBox its Free!!!