]> gitweb.fperrin.net Git - Dictionary.git/commitdiff
Adding easter egg :)
authorThad Hughes <thad.hughes@gmail.com>
Wed, 1 Feb 2012 01:56:22 +0000 (17:56 -0800)
committerThad Hughes <thad.hughes@gmail.com>
Wed, 1 Feb 2012 01:56:22 +0000 (17:56 -0800)
res/drawable/thadolina.jpg [new file with mode: 0644]
res/layout/thadolina_dialog.xml [new file with mode: 0644]
src/com/hughes/android/dictionary/DictionaryActivity.java

diff --git a/res/drawable/thadolina.jpg b/res/drawable/thadolina.jpg
new file mode 100644 (file)
index 0000000..4a8c58d
Binary files /dev/null and b/res/drawable/thadolina.jpg differ
diff --git a/res/layout/thadolina_dialog.xml b/res/layout/thadolina_dialog.xml
new file mode 100644 (file)
index 0000000..440d8fc
--- /dev/null
@@ -0,0 +1,31 @@
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/ScrollView01"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent" >
+
+    <LinearLayout
+        android:id="@+id/linearLayout1"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        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/thadolina"
+            android:layout_marginTop="20dip"
+            android:layout_marginBottom="20dip"
+             />
+
+        <TextView
+            android:id="@+id/text1"
+            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:textAppearance="@android:style/TextAppearance.Large" />
+    </LinearLayout>
+
+</ScrollView>
\ No newline at end of file
index c8753a793d94ce9afcad858c4782c85164e757d1..63284ecb25c0f66f4f8e44453658b023a32e9284 100644 (file)
@@ -1083,6 +1083,12 @@ public class DictionaryActivity extends ListActivity {
   // --------------------------------------------------------------------------\r
 \r
   void onSearchTextChange(final String text) {\r
+    if ("thadolina".equals(text)) {\r
+      final Dialog dialog = new Dialog(getListView().getContext());\r
+      dialog.setContentView(R.layout.thadolina_dialog);\r
+      dialog.setTitle("Ti amo, amore mio!");\r
+      dialog.show();\r
+    }\r
     if (dictRaf == null) {\r
       Log.d(LOG, "searchText changed during shutdown, doing nothing.");\r
       return;\r