]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - src/com/hughes/android/dictionary/HtmlDisplayActivity.java
Avoid inheriting from Application.
[Dictionary.git] / src / com / hughes / android / dictionary / HtmlDisplayActivity.java
index e96b351ebb7a46560831fd45bbd6890fe4f8862e..2dabd801dc38c5ec6cb7b05c730262822804a0eb 100644 (file)
@@ -71,7 +71,8 @@ public final class HtmlDisplayActivity extends ActionBarActivity {
     /** Called when the activity is first created. */
     @Override
     public void onCreate(final Bundle savedInstanceState) {
-        setTheme(((DictionaryApplication) getApplication()).getSelectedTheme().themeId);
+        DictionaryApplication.INSTANCE.init(getApplicationContext());
+        setTheme(DictionaryApplication.INSTANCE.getSelectedTheme().themeId);
 
         super.onCreate(savedInstanceState);
         setContentView(R.layout.html_display_activity);