]> gitweb.fperrin.net Git - Dictionary.git/commitdiff
Trying to update to newest Android settings.
authorThad Hughes <thadh@google.com>
Mon, 27 May 2013 19:13:49 +0000 (12:13 -0700)
committerThad Hughes <thadh@google.com>
Mon, 27 May 2013 19:13:49 +0000 (12:13 -0700)
23 files changed:
AndroidManifest.xml
default.properties [deleted file]
proguard-project.txt [new file with mode: 0644]
res/drawable-hdpi/ic_launcher.png [new file with mode: 0644]
res/drawable-mdpi/ic_launcher.png [new file with mode: 0644]
res/drawable-xhdpi/ic_launcher.png [new file with mode: 0644]
res/drawable-xxhdpi/ic_launcher.png [new file with mode: 0644]
res/menu/dictionary_manager.xml [new file with mode: 0644]
res/values-de/strings.xml
res/values-es/strings.xml
res/values-it/strings.xml
res/values-sw600dp/dimens.xml [new file with mode: 0644]
res/values-sw720dp-land/dimens.xml [new file with mode: 0644]
res/values-v11/styles.xml
res/values-v14/styles.xml [new file with mode: 0644]
res/values/dimens.xml
res/values/strings.xml
res/values/styles.xml
res/xml/settings.xml [moved from res/xml/preferences.xml with 100% similarity]
src/com/hughes/android/dictionary/DictionaryActivity.java
src/com/hughes/android/dictionary/DictionaryApplication.java
src/com/hughes/android/dictionary/DictionaryManagerActivity.java
src/com/hughes/android/dictionary/SettingsActivity.java [moved from src/com/hughes/android/dictionary/PreferenceActivity.java with 84% similarity]

index 0c8e8ace574d3b2db9da24ec92c0d538a2b06c20..e518dc4ab2ec2c074392658ee123af1a399df49d 100644 (file)
@@ -6,8 +6,8 @@
     android:versionName="4.0.1" >
 
     <uses-sdk
-        android:minSdkVersion="4"
-        android:targetSdkVersion="16" />
+        android:minSdkVersion="10"
+        android:targetSdkVersion="17" />
 
     <uses-feature
         android:name="android.hardware.touchscreen"
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
     
     <application
+        android:allowBackup="true"
         android:name=".DictionaryApplication"
         android:icon="@drawable/icon"
         android:label="@string/app_name"
-        android:theme="@style/Theme.Light" >
+        android:theme="@style/AppTheme" >
 
         <meta-data
             android:name="com.google.android.backup.api_key"
@@ -40,7 +41,7 @@
         <activity android:name=".DictionaryEditActivity" />
         <activity android:name=".AboutActivity" />
         <activity android:name=".HtmlDisplayActivity" />
-        <activity android:name=".PreferenceActivity" />
+        <activity android:name=".SettingsActivity" />
         <activity
             android:name=".DownloadActivity"
             android:configChanges="keyboardHidden|orientation" />
diff --git a/default.properties b/default.properties
deleted file mode 100644 (file)
index 6f491fb..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system use,
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-
-# Indicates whether an apk should be generated for each density.
-split.density=false
-# Project target.
-target=android-17
-android.library.reference.1=../Util
diff --git a/proguard-project.txt b/proguard-project.txt
new file mode 100644 (file)
index 0000000..f2fe155
--- /dev/null
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
diff --git a/res/drawable-hdpi/ic_launcher.png b/res/drawable-hdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..288b665
Binary files /dev/null and b/res/drawable-hdpi/ic_launcher.png differ
diff --git a/res/drawable-mdpi/ic_launcher.png b/res/drawable-mdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..6ae570b
Binary files /dev/null and b/res/drawable-mdpi/ic_launcher.png differ
diff --git a/res/drawable-xhdpi/ic_launcher.png b/res/drawable-xhdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..d4fb7cd
Binary files /dev/null and b/res/drawable-xhdpi/ic_launcher.png differ
diff --git a/res/drawable-xxhdpi/ic_launcher.png b/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..85a6081
Binary files /dev/null and b/res/drawable-xxhdpi/ic_launcher.png differ
diff --git a/res/menu/dictionary_manager.xml b/res/menu/dictionary_manager.xml
new file mode 100644 (file)
index 0000000..cc0c8c1
--- /dev/null
@@ -0,0 +1,9 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+
+    <item
+        android:id="@+id/action_settings"
+        android:orderInCategory="100"
+        android:showAsAction="never"
+        android:title="@string/settings"/>
+
+</menu>
index 98c48cc2b968e2a93fb358ebae16b1575c46b838..4f0ba832ad2edfdf227f6ee51dbea189778c7538 100644 (file)
@@ -7,7 +7,7 @@
        
   <!-- Global. -->
   <string name="about">Über QuickDic…</string>
-  <string name="preferences">Einstellungen…</string>
+  <string name="settings">Einstellungen…</string>
   <string name="help">Hilfe</string>
   <string name="reportIssue">Problem melden…</string>
   <string name="fontWorkaround">Detected font problem (common on Sony Ericsson devices), switching back to default font.</string>
index 82160d943cbac8c72ef8e4c2c90908c56f3e3ae6..eab01443a1835cf3dc0261589837c1207cbf4701 100644 (file)
@@ -7,7 +7,7 @@
   
   <!-- Global. -->
   <string name="about">Acerca de QuickDic…</string> 
-  <string name="preferences">Preferencias…</string>
+  <string name="settings">Preferencias…</string>
   <string name="help">Ayuda</string>
   <string name="reportIssue">Informar de errores…</string>
   <string name="fontWorkaround">Detectado problema con el tipo de letra (común en dispositivos Sony Ericsson), volviendo al tipo de letra predeterminado del sistema.</string>
index f6863609f45d405cba04fcf608dc15e3aeadfa1b..0bbcfc65768be87ec5a1c4593ee5ccecb95ecb00 100644 (file)
@@ -4,7 +4,7 @@
 <string name="titleWithVersion">QuickDic 4.0.1</string>
 <!-- Global. -->
 <string name="about">About QuickDic…</string>
-<string name="preferences">Preferenze…</string>
+<string name="settings">Preferenze…</string>
 <string name="help">Guida</string>
 <string name="reportIssue">Segnala problema…</string>
 <string name="fontWorkaround">
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
new file mode 100644 (file)
index 0000000..44f01db
--- /dev/null
@@ -0,0 +1,8 @@
+<resources>
+
+    <!--
+         Customize dimensions originally defined in res/values/dimens.xml (such as
+         screen margins) for sw600dp devices (e.g. 7" tablets) here.
+    -->
+
+</resources>
diff --git a/res/values-sw720dp-land/dimens.xml b/res/values-sw720dp-land/dimens.xml
new file mode 100644 (file)
index 0000000..61e3fa8
--- /dev/null
@@ -0,0 +1,9 @@
+<resources>
+
+    <!--
+         Customize dimensions originally defined in res/values/dimens.xml (such as
+         screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
+    -->
+    <dimen name="activity_horizontal_margin">128dp</dimen>
+
+</resources>
index 427e62bf72d88c694d60d09a910e84f83a75376e..b1b626499a07cc4a7ea03e591921938bc1e7d43d 100644 (file)
@@ -1,6 +1,13 @@
-<?xml version="1.0" encoding="utf-8"?>
 <resources>
 
+    <!--
+        Base application theme for API 11+. This theme completely replaces
+        AppBaseTheme from res/values/styles.xml on API 11+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
+        <!-- API 11 theme customizations can go here. -->
+    </style>
+    
     <style name="BorderlessButton">
         <item name="android:background">?android:attr/selectableItemBackground</item>
         <item name="android:paddingLeft">4dip</item>
diff --git a/res/values-v14/styles.xml b/res/values-v14/styles.xml
new file mode 100644 (file)
index 0000000..a91fd03
--- /dev/null
@@ -0,0 +1,12 @@
+<resources>
+
+    <!--
+        Base application theme for API 14+. This theme completely replaces
+        AppBaseTheme from BOTH res/values/styles.xml and
+        res/values-v11/styles.xml on API 14+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+        <!-- API 14 theme customizations can go here. -->
+    </style>
+
+</resources>
index 78c3957d79191f47bd82a3d05204002756014084..55c1e5908c7e0f157fe815acd6d5cd7358463390 100644 (file)
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
 <resources>
 
-    <dimen name="default_padding">8dp</dimen>
+    <!-- Default screen margins, per the Android Design guidelines. -->
+    <dimen name="activity_horizontal_margin">16dp</dimen>
+    <dimen name="activity_vertical_margin">16dp</dimen>
 
-</resources>
\ No newline at end of file
+</resources>
index b9f3f1748112eda47a7f8c662c3c7ee698581b99..b28da4bd4a423d69e8da3141f8101ebd30453718 100644 (file)
@@ -7,7 +7,7 @@
   
   <!-- Global. -->
   <string name="about">About QuickDic…</string> 
-  <string name="preferences">Preferences…</string>
+  <string name="settings">Settings…</string>
   <string name="help">Help</string>
   <string name="reportIssue">Report issue…</string>
   <string name="fontWorkaround">Detected font problem (common on Sony Ericsson devices), switching back to default font.</string>
index 7ca597fd680d6e455114aa53f9bbcd7b855f098a..46e7d9025c3c1e44ae707445d26b46772155f141 100644 (file)
@@ -1,10 +1,26 @@
-<?xml version="1.0" encoding="utf-8"?>
 <resources>
 
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Light">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
     <style name="BorderlessButton">
         <item name="android:background">@null</item>
         <item name="android:paddingLeft">4dip</item>
         <item name="android:paddingRight">4dip</item>
     </style>
 
-</resources>
\ No newline at end of file
+</resources>
similarity index 100%
rename from res/xml/preferences.xml
rename to res/xml/settings.xml
index f432a8faa7aa63ac10da5fea447e3a0c27cfd8b0..56ded03c6c97e86634905d7f435546141795a1ff 100644 (file)
@@ -422,8 +422,8 @@ public class DictionaryActivity extends ListActivity {
     protected void onResume() {
         Log.d(LOG, "onResume");
         super.onResume();
-        if (PreferenceActivity.prefsMightHaveChanged) {
-            PreferenceActivity.prefsMightHaveChanged = false;
+        if (SettingsActivity.settingsMightHaveChanged) {
+            SettingsActivity.settingsMightHaveChanged = false;
             finish();
             startActivity(getIntent());
         }
index 72892daace9ba00add4777ae532b665451a90951..e6de29f6ac30a739ceef2ceeb42529f9c2b90e83 100644 (file)
@@ -141,12 +141,12 @@ public class DictionaryApplication extends Application {
       }
     });
 
-    final MenuItem preferences = menu.add(getString(R.string.preferences));
+    final MenuItem preferences = menu.add(getString(R.string.settings));
     preferences.setOnMenuItemClickListener(new OnMenuItemClickListener() {
       public boolean onMenuItemClick(final MenuItem menuItem) {
-        PreferenceActivity.prefsMightHaveChanged = true;
-        final Intent intent = new Intent().setClassName(PreferenceActivity.class
-            .getPackage().getName(), PreferenceActivity.class.getCanonicalName());
+        SettingsActivity.settingsMightHaveChanged = true;
+        final Intent intent = new Intent().setClassName(SettingsActivity.class
+            .getPackage().getName(), SettingsActivity.class.getCanonicalName());
         context.startActivity(intent);
         return false;
       }
index 8ca3c92aea6f02632db1e08bf1e9ffb268633b92..98f3a1e19b4f43924d04118df9195facf1fcabcb 100644 (file)
@@ -149,8 +149,8 @@ public class DictionaryManagerActivity extends ListActivity {
   protected void onResume() {
     super.onResume();
     
-    if (PreferenceActivity.prefsMightHaveChanged) {
-      PreferenceActivity.prefsMightHaveChanged = false;
+    if (SettingsActivity.settingsMightHaveChanged) {
+      SettingsActivity.settingsMightHaveChanged = false;
       finish();
       startActivity(getIntent());
     }
similarity index 84%
rename from src/com/hughes/android/dictionary/PreferenceActivity.java
rename to src/com/hughes/android/dictionary/SettingsActivity.java
index b179c3f54f6406c50f8232b69e1f57aaa2457530..761f1eeca47dfc1ea4ef42d53d70e833fab14fb9 100644 (file)
@@ -16,9 +16,9 @@ package com.hughes.android.dictionary;
 
 import android.os.Bundle;
 
-public class PreferenceActivity extends android.preference.PreferenceActivity {
+public class SettingsActivity extends android.preference.PreferenceActivity {
   
-  static boolean prefsMightHaveChanged = false;
+  static boolean settingsMightHaveChanged = false;
   
   @SuppressWarnings("deprecation")
 @Override
@@ -26,12 +26,11 @@ public class PreferenceActivity extends android.preference.PreferenceActivity {
     setTheme(((DictionaryApplication)getApplication()).getSelectedTheme().themeId);
 
     super.onCreate(savedInstanceState);
-    addPreferencesFromResource(R.xml.preferences);
+    addPreferencesFromResource(R.xml.settings);
   }
 
   @Override
   public void onContentChanged() {
     super.onContentChanged();
   }
-
 }