July 13th, 2009, 03:43 PM
Thread Author (OP)
Join Date: Jul 2009
Carrier: Not Provided
Thanked 0 Times in 0 Posts
If statement problem?
I'm really confused right now as to why this isn't working.
What I am trying to achieve is to allow the user to select either the Light theme or the Dark theme. Now I have got that bit sorted (Storing it in preferences). The problem is coming to applying the theme. I'm trying to apply the theme before the super.onCreate() method in the onCreate method.
public static String mSettingTheme;
protected void onCreate(Bundle savedInstanceState)
/* THEME LOGIC BEFORE SUPER.ONCREATE*/
// Load the settings from Disk and set anythign up we need to before drawing.
mSettingTheme = loadSettings();
if( mSettingTheme == "Light" )
else if (mSettingTheme == "Dark")
// Load view
The loadSettings() method is returning a string with the name of the theme to load ("Light" or "Dark"). However neither of the if conditions are met and it fails to load either and I cannot understand why.
Thanks in advance for any help
Last edited by SystemBomber; July 13th, 2009 at 03:44 PM.