]> gitweb.fperrin.net Git - Dictionary.git/commitdiff
Fixed font problems!
authorThad Hughes <thad.hughes@gmail.com>
Wed, 9 May 2012 22:07:10 +0000 (15:07 -0700)
committerThad Hughes <thad.hughes@gmail.com>
Wed, 9 May 2012 22:07:10 +0000 (15:07 -0700)
AndroidManifest.xml
Dictionary_signed.apk
res/layout/about_activity.xml
res/layout/dictionary_manager_activity.xml
res/layout/thadolina_dialog.xml
res/values-de/strings.xml
src/com/hughes/android/dictionary/DictionaryActivity.java

index fce48471c29fc223e4334d902e5dca52d3d3ecf2..ca1e53f0e59e919e635ce89a5c2c5fb8baceb16b 100644 (file)
@@ -8,7 +8,7 @@
  android:versionName="3.2.2"
  android:installLocation="auto">
 
- <uses-sdk android:minSdkVersion="4" />
+ <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="15"/>
  
    <!--
     Because android:minSdkVersion is 3, these parameters default to
index 435dfa092d0c2f5224bf7f517afba7dc7f1fe397..7991959d68728011547b876ecbbc2281002a23ff 100644 (file)
Binary files a/Dictionary_signed.apk and b/Dictionary_signed.apk differ
index 781b682c1c6755816508e8c39979b4f185fcfa8e..e47364161afc8fd88f0710e6e7cf91ccd2b81852 100644 (file)
-<ScrollView android:id="@+id/ScrollView01"
-       xmlns:android="http://schemas.android.com/apk/res/android"
-       android:layout_width="wrap_content" 
-       android:layout_height="wrap_content">
-       
-<LinearLayout 
-       android:id="@+id/LinearLayout01"
-       android:orientation="vertical"
-       android:layout_width="fill_parent"
-       android:layout_height="wrap_content"
-       >
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/ScrollView01"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    tools:ignore="HardcodedText" >
 
-       <LinearLayout 
-               android:id="@+id/LinearLayout02"
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:layout_gravity="center_horizontal"
-               android:paddingBottom="10dip">
+    <LinearLayout
+        android:id="@+id/LinearLayout01"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical" >
 
-               <ImageView 
-                       android:id="@+id/ImageView01"
-                       android:layout_width="wrap_content" 
-                       android:layout_height="wrap_content"
-                       android:layout_gravity="center_horizontal"
-                       android:background="@drawable/icon" 
-      android:contentDescription="icon"/>
+        <LinearLayout
+            android:id="@+id/LinearLayout02"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_horizontal"
+            android:paddingBottom="10dip" >
 
-               <TextView 
-                       android:id="@+id/title" 
-                       android:text="@string/titleWithVersion"
-                       android:textAppearance="?android:attr/textAppearanceLarge"
-                       android:layout_width="wrap_content" 
-                       android:layout_height="wrap_content"
-                       android:layout_gravity="center_vertical|fill_vertical" />
-       </LinearLayout>
+            <ImageView
+                android:id="@+id/ImageView01"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_horizontal"
+                android:background="@drawable/icon"
+                android:contentDescription="icon" />
 
-       <TextView 
-               android:id="@+id/copyright"
-               android:text="Copyright 2009-2011 Google Inc." 
-               android:layout_width="wrap_content" 
-               android:layout_height="wrap_content"
-               android:layout_gravity="center_horizontal"/>
+            <TextView
+                android:id="@+id/title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical|fill_vertical"
+                android:text="@string/titleWithVersion"
+                android:textAppearance="?android:attr/textAppearanceLarge" />
+        </LinearLayout>
 
-       <TextView 
-               android:id="@+id/author"
-               android:text="Thad Hughes" 
-               android:layout_width="wrap_content" 
-               android:layout_height="wrap_content"
-               android:layout_gravity="center_horizontal"
-               android:paddingBottom="10dip"/>
+        <TextView
+            android:id="@+id/copyright"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_horizontal"
+            android:text="Copyright 2009-2011 Google Inc." />
 
-       <TextView 
-               android:id="@+id/emailMe"
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content" 
-               android:text="@string/contactMe"/>
+        <TextView
+            android:id="@+id/author"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_horizontal"
+            android:paddingBottom="10dip"
+            android:text="Thad Hughes" />
 
-       <TextView 
-               android:id="@+id/email" 
-               android:text="@string/myEmail"
-               android:autoLink="email"
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content" 
-               android:clickable="true" 
-               android:layout_gravity="left"
-               android:paddingBottom="10dip"/>
-  
-    <TextView 
-    android:id="@+id/webPage"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content" 
-    android:text="@string/webPage"/>
+        <TextView
+            android:id="@+id/emailMe"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/contactMe" />
 
-  <TextView 
-    android:id="@+id/webPageUrl" 
-    android:text="@string/webPageUrl"
-    android:autoLink="web"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content" 
-    android:clickable="true" 
-    android:layout_gravity="left"
-    android:paddingBottom="10dip"/>
-  
-  <TextView
-    android:id="@+id/license" 
-    android:text="@string/license"
-    android:autoLink="web"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content" 
-    android:layout_gravity="left"/>
+        <TextView
+            android:id="@+id/email"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="left"
+            android:autoLink="email"
+            android:clickable="true"
+            android:paddingBottom="10dip"
+            android:text="@string/myEmail" />
 
-  <TextView
-    android:id="@+id/licenseUrl" 
-    android:text="@string/licenseUrl"
-    android:autoLink="web"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content" 
-    android:layout_gravity="left"
-    android:paddingBottom="10dip"/>
-  
-</LinearLayout>
+        <TextView
+            android:id="@+id/webPage"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/webPage" />
+
+        <TextView
+            android:id="@+id/webPageUrl"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="left"
+            android:autoLink="web"
+            android:clickable="true"
+            android:paddingBottom="10dip"
+            android:text="@string/webPageUrl" />
+
+        <TextView
+            android:id="@+id/license"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="left"
+            android:autoLink="web"
+            android:text="@string/license" />
+
+        <TextView
+            android:id="@+id/licenseUrl"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="left"
+            android:autoLink="web"
+            android:paddingBottom="10dip"
+            android:text="@string/licenseUrl" />
+    </LinearLayout>
 
 </ScrollView>
\ No newline at end of file
index 96a09671dc4f9af60b989179d523a3d1875a95f6..5fc34ce2512c9dfada1351e9af99cbde4a19943f 100644 (file)
@@ -37,7 +37,7 @@
     android:layout_weight="1.0"
     />
 
-   <TextView 
+   <EditText 
      android:id="@+id/DictionaryListHeader"
      android:hint="@string/helpText"
      android:layout_width="fill_parent"
index d9ea0fb44b13c6247baa9f16a29cb4f441d559c5..fb0e10271f1c35b44ac276f912f8e3fecd6c7ba6 100644 (file)
@@ -1,7 +1,9 @@
 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:id="@+id/ScrollView01"
     android:layout_width="fill_parent"
-    android:layout_height="fill_parent" >
+    android:layout_height="fill_parent"
+    tools:ignore="HardcodedText" >
 
     <LinearLayout
         android:id="@+id/linearLayout1"
         android:layout_height="wrap_content"
         android:orientation="vertical" >
 
-       <TextView
-         android:layout_marginTop="20dip"
-         android:id="@+id/text_quote_flower"
-         android:layout_width="wrap_content"
-         android:layout_height="wrap_content"
-         android:layout_gravity="center_horizontal"
-         android:text="There is a flower... I think that she has tamed me..."
-         android:layout_marginBottom="20dip"
-          />
-        
+        <TextView
+            android:id="@+id/text_quote_flower"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_horizontal"
+            android:layout_marginBottom="20dip"
+            android:layout_marginTop="20dip"
+            android:text="There is a flower... I think that she has tamed me..." />
+
         <ImageView
             android:id="@+id/thadolina_image"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:background="@drawable/thadolina"
             android:layout_marginBottom="20dip"
-            android:contentDescription="Ti amo tanto!"
-             />
+            android:background="@drawable/thadolina"
+            android:contentDescription="Ti amo tanto!" />
 
         <TextView
             android:id="@+id/text_message"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:text="Happy Valentine's Day, amore mio!  And happy every other day, too!" 
-            android:textAppearance="@android:style/TextAppearance.Large"
             android:layout_marginBottom="20dip"
-            />
-        
+            android:text="Happy Valentine&apos;s Day, amore mio!  And happy every other day, too!"
+            android:textAppearance="@android:style/TextAppearance.Large" />
+
         <TextView
             android:id="@+id/text_quote"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:text="It is only with the heart that one can see rightly; what is essential is invisible to the eye."
-             />
-
-        
+            android:text="It is only with the heart that one can see rightly; what is essential is invisible to the eye." />
     </LinearLayout>
 
 </ScrollView>
\ No newline at end of file
index f78b506ae197748364387d58f5b41896b66e4f1d..f9551abf76e1c6b529bf0753f5644d3f4688ad59 100644 (file)
@@ -21,7 +21,9 @@
   <string name="moveToTop">Nach Anfang ziehen</string>
   <string name="deleteDictionary">Wörterbuch entfernen</string>
   <string name="indexInfo">%1$s: %2$,d Wörter</string>
-
+  <string name="managerFilterText">Filter</string>
+  <string name="managerFilterCheckbox">Nur SD-Karte</string>
+  
   <string name="thanksForUpdatingVersion">3.2.2_de_a</string>
 
   <!-- DictionaryActivity -->
index 89869b646e0dd4aa543288fe514cf68f9ffa0e62..e1c4c707d1d0d0d380b5771cedeade170e5b2bb5 100644 (file)
@@ -250,6 +250,7 @@ public class DictionaryActivity extends ListActivity {
     \r
     final int fontWorkAround = prefs.getInt(C.FONT_WORKAROUND, 1);\r
     if (fontWorkAround == 0) {\r
+      Log.w(LOG, "Loading font seemed to fail last time, trying with default font.");\r
       Toast.makeText(this, getString(R.string.fontWorkaround), Toast.LENGTH_LONG).show();\r
       prefs.edit().putString(getString(R.string.fontKey), "SYSTEM").commit();\r
     }\r
@@ -278,8 +279,6 @@ public class DictionaryActivity extends ListActivity {
     } catch (NumberFormatException e) {\r
       fontSizeSp = 14;\r
     } \r
-    // Things worked with loading the font.\r
-    prefs.edit().putInt(C.FONT_WORKAROUND, 1).commit();\r
 \r
 \r
     setContentView(R.layout.dictionary_activity);\r
@@ -392,6 +391,11 @@ public class DictionaryActivity extends ListActivity {
   @Override\r
   protected void onPause() {\r
     super.onPause();\r
+    \r
+    // If the app exits normally, this will happen.\r
+    final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\r
+    Log.d(LOG, "Loading font seemed to work.");\r
+    prefs.edit().putInt(C.FONT_WORKAROUND, 1).commit();\r
   }\r
   \r
   private static void setDictionaryPrefs(final Context context,\r