android-ibc-forum

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 1806f8df32c138ba22e49822dc275ec0d491502c
parent 73f5810b474b053ad2913e5429126bd861268b60
Author: Jan Dankert <devnull@localhost>
Date:   Mon,  6 Feb 2012 20:07:44 +0100

Setzen des Themes nur in der Application. Einstellung in der Konfiguration aktiviert.

Diffstat:
AndroidManifest.xml | 2+-
res/values/strings.xml | 2+-
res/xml/preferences.xml | 3+--
src/de/mtbnews/android/CreateTopicActivity.java | 3---
src/de/mtbnews/android/ForumActivity.java | 3---
src/de/mtbnews/android/ForumOverviewActivity.java | 3---
src/de/mtbnews/android/IBCActivity.java | 3---
src/de/mtbnews/android/IBCApplication.java | 5+++--
src/de/mtbnews/android/MailActivity.java | 3---
src/de/mtbnews/android/MailboxActivity.java | 3---
src/de/mtbnews/android/ReplyMailActivity.java | 3---
src/de/mtbnews/android/ReplyPostActivity.java | 3---
src/de/mtbnews/android/SearchActivity.java | 2--
src/de/mtbnews/android/SubscriptionForenActivity.java | 3---
src/de/mtbnews/android/SubscriptionTopicsActivity.java | 3---
src/de/mtbnews/android/TopicActivity.java | 5+----
16 files changed, 7 insertions(+), 42 deletions(-)

diff --git a/AndroidManifest.xml b/AndroidManifest.xml @@ -3,7 +3,7 @@ android:versionCode="4" android:versionName="1.3" package="de.mtbnews.android"> <application android:icon="@drawable/ibc_icon" android:name=".IBCApplication" - android:label="@string/app_name" android:theme="@style/IBC"> + android:label="@string/app_name"> <activity android:name=".IBCActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> diff --git a/res/values/strings.xml b/res/values/strings.xml @@ -80,7 +80,7 @@ <string name="scroll_down">Zum Ende springen</string> <string name="scroll_down_desc">Beim Laden von Themen automatisch zum letzten Beitrag springen</string> - <string name="use_ibc_theme">Das IBC-Theme benutzen</string> + <string name="use_ibc_theme">IBC-Theme benutzen</string> <string name="auto_login">Automatisch anmelden</string> <string name="auto_login_desc">Beim Starten des Forums automatisch anmelden. </string> diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml @@ -3,8 +3,7 @@ android:title="@string/preferences"> <CheckBoxPreference android:defaultValue="true" - android:key="ibc_theme" android:title="@string/use_ibc_theme" - android:enabled="false" /> + android:key="ibc_theme" android:title="@string/use_ibc_theme" /> <CheckBoxPreference android:defaultValue="true" android:key="show_hints" android:title="@string/show_hints" /> diff --git a/src/de/mtbnews/android/CreateTopicActivity.java b/src/de/mtbnews/android/CreateTopicActivity.java @@ -21,9 +21,6 @@ public class CreateTopicActivity extends Activity @Override protected void onCreate(Bundle savedInstanceState) { - if (((IBCApplication) getApplication()).ibcTheme) - setTheme(R.style.IBC); - setContentView(R.layout.post); super.onCreate(savedInstanceState); diff --git a/src/de/mtbnews/android/ForumActivity.java b/src/de/mtbnews/android/ForumActivity.java @@ -47,9 +47,6 @@ public class ForumActivity extends EndlessListActivity<Topic> @Override protected void onCreate(Bundle savedInstanceState) { - if (((IBCApplication) getApplication()).ibcTheme) - setTheme(R.style.IBC); - super.onCreate(savedInstanceState); setContentView(R.layout.listing); diff --git a/src/de/mtbnews/android/ForumOverviewActivity.java b/src/de/mtbnews/android/ForumOverviewActivity.java @@ -41,9 +41,6 @@ public class ForumOverviewActivity extends ExpandableListActivity @Override protected void onCreate(Bundle savedInstanceState) { - if (((IBCApplication) getApplication()).ibcTheme) - setTheme(R.style.IBC); - super.onCreate(savedInstanceState); setContentView(R.layout.exp_listing); diff --git a/src/de/mtbnews/android/IBCActivity.java b/src/de/mtbnews/android/IBCActivity.java @@ -52,9 +52,6 @@ public class IBCActivity extends ListActivity @Override public void onCreate(Bundle savedInstanceState) { - if ( ((IBCApplication)getApplication()).ibcTheme ) - setTheme(R.style.IBC); - super.onCreate(savedInstanceState); setContentView(R.layout.start); diff --git a/src/de/mtbnews/android/IBCApplication.java b/src/de/mtbnews/android/IBCApplication.java @@ -30,7 +30,6 @@ public class IBCApplication extends Application public TapatalkClient client; public SharedPreferences prefs; - public boolean ibcTheme; public TapatalkClient getTapatalkClient() { @@ -47,7 +46,9 @@ public class IBCApplication extends Application { client = new TapatalkClient(IBC.IBC_FORUM_CONNECTOR_URL); prefs = PreferenceManager.getDefaultSharedPreferences(this); - ibcTheme = prefs.getBoolean("ibc_theme", false); + + if (prefs.getBoolean("ibc_theme", true)) + setTheme(R.style.IBC); if (prefs.getBoolean("autostart_subscription_service", false)) { diff --git a/src/de/mtbnews/android/MailActivity.java b/src/de/mtbnews/android/MailActivity.java @@ -26,9 +26,6 @@ public class MailActivity extends EndlessListActivity<Message> @Override protected void onCreate(Bundle savedInstanceState) { - if (((IBCApplication) getApplication()).ibcTheme) - setTheme(R.style.IBC); - setContentView(R.layout.listing); super.onCreate(savedInstanceState); diff --git a/src/de/mtbnews/android/MailboxActivity.java b/src/de/mtbnews/android/MailboxActivity.java @@ -24,9 +24,6 @@ public class MailboxActivity extends ListActivity @Override protected void onCreate(Bundle savedInstanceState) { - if (((IBCApplication) getApplication()).ibcTheme) - setTheme(R.style.IBC); - setContentView(R.layout.listing); super.onCreate(savedInstanceState); diff --git a/src/de/mtbnews/android/ReplyMailActivity.java b/src/de/mtbnews/android/ReplyMailActivity.java @@ -23,9 +23,6 @@ public class ReplyMailActivity extends Activity @Override protected void onCreate(Bundle savedInstanceState) { - if (((IBCApplication) getApplication()).ibcTheme) - setTheme(R.style.IBC); - setContentView(R.layout.post); super.onCreate(savedInstanceState); diff --git a/src/de/mtbnews/android/ReplyPostActivity.java b/src/de/mtbnews/android/ReplyPostActivity.java @@ -24,9 +24,6 @@ public class ReplyPostActivity extends Activity @Override protected void onCreate(Bundle savedInstanceState) { - if (((IBCApplication) getApplication()).ibcTheme) - setTheme(R.style.IBC); - setContentView(R.layout.post); super.onCreate(savedInstanceState); diff --git a/src/de/mtbnews/android/SearchActivity.java b/src/de/mtbnews/android/SearchActivity.java @@ -48,8 +48,6 @@ public class SearchActivity extends EndlessListActivity<Topic> @Override protected void onCreate(Bundle savedInstanceState) { - if (((IBCApplication) getApplication()).ibcTheme) - setTheme(R.style.IBC); prefs = PreferenceManager.getDefaultSharedPreferences(this); super.onCreate(savedInstanceState); setContentView(R.layout.listing); diff --git a/src/de/mtbnews/android/SubscriptionForenActivity.java b/src/de/mtbnews/android/SubscriptionForenActivity.java @@ -43,9 +43,6 @@ public class SubscriptionForenActivity extends ListActivity @Override protected void onCreate(Bundle savedInstanceState) { - if (((IBCApplication) getApplication()).ibcTheme) - setTheme(R.style.IBC); - super.onCreate(savedInstanceState); setContentView(R.layout.listing); diff --git a/src/de/mtbnews/android/SubscriptionTopicsActivity.java b/src/de/mtbnews/android/SubscriptionTopicsActivity.java @@ -38,9 +38,6 @@ public class SubscriptionTopicsActivity extends EndlessListActivity<Topic> @Override protected void onCreate(Bundle savedInstanceState) { - if (((IBCApplication) getApplication()).ibcTheme) - setTheme(R.style.IBC); - super.onCreate(savedInstanceState); setContentView(R.layout.listing); diff --git a/src/de/mtbnews/android/TopicActivity.java b/src/de/mtbnews/android/TopicActivity.java @@ -41,13 +41,10 @@ public class TopicActivity extends EndlessListActivity<Post> private String topicTitle; private int totalSize; - + @Override protected void onCreate(Bundle savedInstanceState) { - if (((IBCApplication) getApplication()).ibcTheme) - setTheme(R.style.IBC); - super.onCreate(savedInstanceState); topicId = TopicActivity.this.getIntent().getStringExtra(TOPIC_ID);