summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vdrmanager/AndroidManifest.xml24
-rw-r--r--vdrmanager/res/values/preferences.xml2
-rw-r--r--vdrmanager/res/xml/preferences.xml5
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java12
4 files changed, 27 insertions, 16 deletions
diff --git a/vdrmanager/AndroidManifest.xml b/vdrmanager/AndroidManifest.xml
index 35fb221..fa6ec31 100644
--- a/vdrmanager/AndroidManifest.xml
+++ b/vdrmanager/AndroidManifest.xml
@@ -20,9 +20,9 @@
</activity>
<activity android:name=".gui.TimeEpgListActivity"
- android:configChanges="orientation" />
+ android:configChanges="orientation|locale" />
<activity android:name=".gui.EventEpgListActivity"
- android:configChanges="orientation">
+ android:configChanges="orientation|locale">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
@@ -30,7 +30,7 @@
android:value=".gui.EpgSearchListActivity" />
</activity>
<activity android:name=".gui.TimerListActivity"
- android:configChanges="orientation">
+ android:configChanges="orientation|locale">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
@@ -38,9 +38,9 @@
android:value=".gui.EpgSearchListActivity" />
</activity>
<activity android:name=".gui.PreferencesActivity"
- android:configChanges="orientation"></activity>
+ android:configChanges="orientation|locale"/>
<activity android:name=".gui.ChannelListActivity"
- android:configChanges="orientation">
+ android:configChanges="orientation|locale">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
@@ -48,7 +48,7 @@
android:value=".gui.EpgSearchListActivity" />
</activity>
<activity android:name=".gui.EpgDetailsActivity"
- android:configChanges="orientation">
+ android:configChanges="orientation|locale">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
@@ -63,19 +63,19 @@
android:value=".gui.EpgSearchListActivity" />
</activity>
<activity android:name=".gui.RecordingListActivity"
- android:configChanges="orientation">
+ android:configChanges="orientation|locale">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data android:name="android.app.default_searchable"
android:value=".gui.EpgSearchListActivity" />
</activity>
- <activity android:name=".gui.EpgSearchListActivity"
- android:configChanges="orientation">
+ <activity android:name=".gui.EpgSearchListActivity" android:launchMode="singleTask"
+ android:configChanges="orientation|locale">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
- <meta-data android:name="android.app.searchable"
+ <meta-data android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
@@ -88,7 +88,9 @@
</application>
- <uses-permission android:name="android.permission.INTERNET"></uses-permission>
+ <uses-permission android:name="android.permission.INTERNET"/>
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="7" />
diff --git a/vdrmanager/res/values/preferences.xml b/vdrmanager/res/values/preferences.xml
index 4774bdb..45d0b34 100644
--- a/vdrmanager/res/values/preferences.xml
+++ b/vdrmanager/res/values/preferences.xml
@@ -112,7 +112,7 @@
<item>imdb.pt</item>
</string-array>
<string-array name="lang_values">
- <item></item>
+ <item>DEFAULT</item>
<item>en</item>
<item>de</item>
</string-array>
diff --git a/vdrmanager/res/xml/preferences.xml b/vdrmanager/res/xml/preferences.xml
index 4e66c97..001b2f9 100644
--- a/vdrmanager/res/xml/preferences.xml
+++ b/vdrmanager/res/xml/preferences.xml
@@ -102,6 +102,11 @@
android:summaryOn="@string/gui_quit_on_back_summary_on"
android:summaryOff="@string/gui_quit_on_back_summary_off"
android:defaultValue="true" />
+
+ <ListPreference android:key="@string/gui_custom_locale_key"
+ android:title="@string/gui_custom_locale_title" android:summary="@string/gui_custom_locale_sum"
+ android:entries="@array/lang" android:entryValues="@array/lang_values" android:defaultValue="DEFAULT" />
+
</PreferenceCategory>
<PreferenceCategory android:title="@string/livetv">
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java
index 8497db7..9f4151f 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java
@@ -16,6 +16,8 @@ import de.bjusystems.vdrmanager.R;
*/
public class Preferences {
+ public static final String DEFAULT_LANGUAGE_VALUE = "DEFAULT";
+
private boolean ssl;
/** SVDRP host name or ip */
private String svdrpHost;
@@ -677,11 +679,13 @@ public class Preferences {
* {@link Context}
*/
public static void setLocale(final Context context) {
- final String lc = getString(context, R.string.gui_custom_locale_key, null);
- if (TextUtils.isEmpty(lc)) {
- return;
+ String lc = getString(context, R.string.gui_custom_locale_key, DEFAULT_LANGUAGE_VALUE);
+ Locale locale;
+ if(lc.equals(DEFAULT_LANGUAGE_VALUE) == false){
+ locale = new Locale(lc);
+ } else {
+ locale = new Locale("");
}
- final Locale locale = new Locale(lc);
Locale.setDefault(locale);
final Configuration config = new Configuration();
config.locale = locale;