diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..a4763d1
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a95ae19
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,20 @@
+*.class
+*~
+DEADJOE
+.#*
+*.jar
+*.zip
+*.apk
+bin/
+gen/
+bin/*
+gen/*
+libs/
+libs/*
+compiled/
+compiled/*
+local.properties
+build.xml
+assets/build.properties
+.settings/
+.settings/*
diff --git a/.project b/.project
new file mode 100644
index 0000000..b88912f
--- /dev/null
+++ b/.project
@@ -0,0 +1,33 @@
+
+
+ TextFiction
+
+
+
+
+
+ com.android.ide.eclipse.adt.ResourceManagerBuilder
+
+
+
+
+ com.android.ide.eclipse.adt.PreCompilerBuilder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ com.android.ide.eclipse.adt.ApkBuilder
+
+
+
+
+
+ com.android.ide.eclipse.adt.AndroidNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
new file mode 100644
index 0000000..f1e00fd
--- /dev/null
+++ b/AndroidManifest.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/art/alice_box.9.png b/art/alice_box.9.png
new file mode 100644
index 0000000..00d089f
Binary files /dev/null and b/art/alice_box.9.png differ
diff --git a/art/alice_box.png b/art/alice_box.png
new file mode 100644
index 0000000..2d5dacc
Binary files /dev/null and b/art/alice_box.png differ
diff --git a/art/alice_box.svg b/art/alice_box.svg
new file mode 100644
index 0000000..0181aad
--- /dev/null
+++ b/art/alice_box.svg
@@ -0,0 +1,86 @@
+
+
+
+
diff --git a/art/alice_bubble_left.9.png b/art/alice_bubble_left.9.png
new file mode 100644
index 0000000..3b92d22
Binary files /dev/null and b/art/alice_bubble_left.9.png differ
diff --git a/art/alice_bubble_left.png b/art/alice_bubble_left.png
new file mode 100644
index 0000000..7d9a344
Binary files /dev/null and b/art/alice_bubble_left.png differ
diff --git a/art/alice_bubble_left.svg b/art/alice_bubble_left.svg
new file mode 100644
index 0000000..28432ff
--- /dev/null
+++ b/art/alice_bubble_left.svg
@@ -0,0 +1,84 @@
+
+
+
+
diff --git a/art/alice_bubble_right.9.png b/art/alice_bubble_right.9.png
new file mode 100644
index 0000000..19ef6a8
Binary files /dev/null and b/art/alice_bubble_right.9.png differ
diff --git a/art/alice_bubble_right.png b/art/alice_bubble_right.png
new file mode 100644
index 0000000..fd42442
Binary files /dev/null and b/art/alice_bubble_right.png differ
diff --git a/art/alice_bubble_right.svg b/art/alice_bubble_right.svg
new file mode 100644
index 0000000..8fba4b0
--- /dev/null
+++ b/art/alice_bubble_right.svg
@@ -0,0 +1,80 @@
+
+
+
+
diff --git a/art/alice_inputbox.9.png b/art/alice_inputbox.9.png
new file mode 100644
index 0000000..41ccd68
Binary files /dev/null and b/art/alice_inputbox.9.png differ
diff --git a/art/alice_inputbox.png b/art/alice_inputbox.png
new file mode 100644
index 0000000..31aa44d
Binary files /dev/null and b/art/alice_inputbox.png differ
diff --git a/art/export.sh b/art/export.sh
new file mode 100755
index 0000000..96f87c1
--- /dev/null
+++ b/art/export.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+for i in ic_launcher.svg; do
+ inkscape -w 48 -e ../res/drawable-mdpi/`basename $i .svg`.png $i;
+ inkscape -w 144 -e ../res/drawable-xxhdpi/`basename $i .svg`.png $i;
+ inkscape -w 72 -e ../res/drawable-hdpi/`basename $i .svg`.png $i;
+ inkscape -w 96 -e ../res/drawable-xhdpi/`basename $i .svg`.png $i;
+done;
+
diff --git a/art/ic_launcher.svg b/art/ic_launcher.svg
new file mode 100644
index 0000000..655b159
--- /dev/null
+++ b/art/ic_launcher.svg
@@ -0,0 +1,265 @@
+
+
+
+
diff --git a/art/nemo_box.9.png b/art/nemo_box.9.png
new file mode 100644
index 0000000..882a1c8
Binary files /dev/null and b/art/nemo_box.9.png differ
diff --git a/art/nemo_box.png b/art/nemo_box.png
new file mode 100644
index 0000000..0bdd308
Binary files /dev/null and b/art/nemo_box.png differ
diff --git a/art/nemo_box.svg b/art/nemo_box.svg
new file mode 100644
index 0000000..b26102b
--- /dev/null
+++ b/art/nemo_box.svg
@@ -0,0 +1,87 @@
+
+
+
+
diff --git a/art/nemo_bubble_left.9.png b/art/nemo_bubble_left.9.png
new file mode 100644
index 0000000..f961be0
Binary files /dev/null and b/art/nemo_bubble_left.9.png differ
diff --git a/art/nemo_bubble_left.png b/art/nemo_bubble_left.png
new file mode 100644
index 0000000..c9ec325
Binary files /dev/null and b/art/nemo_bubble_left.png differ
diff --git a/art/nemo_bubble_left.svg b/art/nemo_bubble_left.svg
new file mode 100644
index 0000000..7c4c9e7
--- /dev/null
+++ b/art/nemo_bubble_left.svg
@@ -0,0 +1,85 @@
+
+
+
+
diff --git a/art/nemo_bubble_right.9.png b/art/nemo_bubble_right.9.png
new file mode 100644
index 0000000..2e5360f
Binary files /dev/null and b/art/nemo_bubble_right.9.png differ
diff --git a/art/nemo_bubble_right.png b/art/nemo_bubble_right.png
new file mode 100644
index 0000000..2c46649
Binary files /dev/null and b/art/nemo_bubble_right.png differ
diff --git a/art/nemo_bubble_right.svg b/art/nemo_bubble_right.svg
new file mode 100644
index 0000000..0a1b560
--- /dev/null
+++ b/art/nemo_bubble_right.svg
@@ -0,0 +1,81 @@
+
+
+
+
diff --git a/art/proto_bubble.svg b/art/proto_bubble.svg
new file mode 100644
index 0000000..c5f496d
--- /dev/null
+++ b/art/proto_bubble.svg
@@ -0,0 +1,62 @@
+
+
+
+
diff --git a/art/shadedregion.9.png b/art/shadedregion.9.png
new file mode 100644
index 0000000..00f2e08
Binary files /dev/null and b/art/shadedregion.9.png differ
diff --git a/art/shadedregion.png b/art/shadedregion.png
new file mode 100644
index 0000000..abadc5d
Binary files /dev/null and b/art/shadedregion.png differ
diff --git a/art/typicons/export.sh b/art/typicons/export.sh
new file mode 100755
index 0000000..f827342
--- /dev/null
+++ b/art/typicons/export.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+for i in *.svg; do
+ inkscape -w 32 -e ../../res/drawable-mdpi/`basename $i .svg`.png $i;
+ inkscape -w 96 -e ../../res/drawable-xxhdpi/`basename $i .svg`.png $i;
+ inkscape -w 48 -e ../../res/drawable-hdpi/`basename $i .svg`.png $i;
+ inkscape -w 64 -e ../../res/drawable-xhdpi/`basename $i .svg`.png $i;
+done;
+
diff --git a/art/typicons/ic_action_down.svg b/art/typicons/ic_action_down.svg
new file mode 100644
index 0000000..180d56b
--- /dev/null
+++ b/art/typicons/ic_action_down.svg
@@ -0,0 +1,12 @@
+
+
+
diff --git a/art/typicons/ic_action_forward.svg b/art/typicons/ic_action_forward.svg
new file mode 100644
index 0000000..ebdeffb
--- /dev/null
+++ b/art/typicons/ic_action_forward.svg
@@ -0,0 +1,12 @@
+
+
+
diff --git a/art/typicons/ic_action_keyboard.svg b/art/typicons/ic_action_keyboard.svg
new file mode 100644
index 0000000..131733a
--- /dev/null
+++ b/art/typicons/ic_action_keyboard.svg
@@ -0,0 +1,21 @@
+
+
+
diff --git a/art/typicons/ic_action_left.svg b/art/typicons/ic_action_left.svg
new file mode 100644
index 0000000..08bb575
--- /dev/null
+++ b/art/typicons/ic_action_left.svg
@@ -0,0 +1,13 @@
+
+
+
diff --git a/art/typicons/ic_action_right.svg b/art/typicons/ic_action_right.svg
new file mode 100644
index 0000000..d3dbe88
--- /dev/null
+++ b/art/typicons/ic_action_right.svg
@@ -0,0 +1,12 @@
+
+
+
diff --git a/art/typicons/ic_action_up.svg b/art/typicons/ic_action_up.svg
new file mode 100644
index 0000000..96daec2
--- /dev/null
+++ b/art/typicons/ic_action_up.svg
@@ -0,0 +1,11 @@
+
+
+
diff --git a/art/typicons/ic_action_user0.svg b/art/typicons/ic_action_user0.svg
new file mode 100644
index 0000000..c1522b3
--- /dev/null
+++ b/art/typicons/ic_action_user0.svg
@@ -0,0 +1,19 @@
+
+
+
diff --git a/art/typicons/ic_action_user1.svg b/art/typicons/ic_action_user1.svg
new file mode 100644
index 0000000..4e74735
--- /dev/null
+++ b/art/typicons/ic_action_user1.svg
@@ -0,0 +1,14 @@
+
+
+
diff --git a/art/typicons/ic_action_user10.svg b/art/typicons/ic_action_user10.svg
new file mode 100644
index 0000000..696a16e
--- /dev/null
+++ b/art/typicons/ic_action_user10.svg
@@ -0,0 +1,20 @@
+
+
+
diff --git a/art/typicons/ic_action_user11.svg b/art/typicons/ic_action_user11.svg
new file mode 100644
index 0000000..13c44e6
--- /dev/null
+++ b/art/typicons/ic_action_user11.svg
@@ -0,0 +1,11 @@
+
+
+
diff --git a/art/typicons/ic_action_user12.svg b/art/typicons/ic_action_user12.svg
new file mode 100644
index 0000000..b47ec30
--- /dev/null
+++ b/art/typicons/ic_action_user12.svg
@@ -0,0 +1,19 @@
+
+
+
diff --git a/art/typicons/ic_action_user13.svg b/art/typicons/ic_action_user13.svg
new file mode 100644
index 0000000..0a033db
--- /dev/null
+++ b/art/typicons/ic_action_user13.svg
@@ -0,0 +1,13 @@
+
+
+
diff --git a/art/typicons/ic_action_user14.svg b/art/typicons/ic_action_user14.svg
new file mode 100644
index 0000000..10e8b0a
--- /dev/null
+++ b/art/typicons/ic_action_user14.svg
@@ -0,0 +1,23 @@
+
+
+
diff --git a/art/typicons/ic_action_user15.svg b/art/typicons/ic_action_user15.svg
new file mode 100644
index 0000000..213df73
--- /dev/null
+++ b/art/typicons/ic_action_user15.svg
@@ -0,0 +1,22 @@
+
+
+
diff --git a/art/typicons/ic_action_user16.svg b/art/typicons/ic_action_user16.svg
new file mode 100644
index 0000000..fd08400
--- /dev/null
+++ b/art/typicons/ic_action_user16.svg
@@ -0,0 +1,20 @@
+
+
+
diff --git a/art/typicons/ic_action_user17.svg b/art/typicons/ic_action_user17.svg
new file mode 100644
index 0000000..433a103
--- /dev/null
+++ b/art/typicons/ic_action_user17.svg
@@ -0,0 +1,18 @@
+
+
+
diff --git a/art/typicons/ic_action_user18.svg b/art/typicons/ic_action_user18.svg
new file mode 100644
index 0000000..006e488
--- /dev/null
+++ b/art/typicons/ic_action_user18.svg
@@ -0,0 +1,34 @@
+
+
+
diff --git a/art/typicons/ic_action_user2.svg b/art/typicons/ic_action_user2.svg
new file mode 100644
index 0000000..ea330bf
--- /dev/null
+++ b/art/typicons/ic_action_user2.svg
@@ -0,0 +1,22 @@
+
+
+
diff --git a/art/typicons/ic_action_user3.svg b/art/typicons/ic_action_user3.svg
new file mode 100644
index 0000000..e45bf5d
--- /dev/null
+++ b/art/typicons/ic_action_user3.svg
@@ -0,0 +1,14 @@
+
+
+
diff --git a/art/typicons/ic_action_user4.svg b/art/typicons/ic_action_user4.svg
new file mode 100644
index 0000000..dc6b526
--- /dev/null
+++ b/art/typicons/ic_action_user4.svg
@@ -0,0 +1,14 @@
+
+
+
diff --git a/art/typicons/ic_action_user5.svg b/art/typicons/ic_action_user5.svg
new file mode 100644
index 0000000..11b8ebf
--- /dev/null
+++ b/art/typicons/ic_action_user5.svg
@@ -0,0 +1,11 @@
+
+
+
diff --git a/art/typicons/ic_action_user6.svg b/art/typicons/ic_action_user6.svg
new file mode 100644
index 0000000..f172b31
--- /dev/null
+++ b/art/typicons/ic_action_user6.svg
@@ -0,0 +1,10 @@
+
+
+
diff --git a/art/typicons/ic_action_user7.svg b/art/typicons/ic_action_user7.svg
new file mode 100644
index 0000000..bd49afc
--- /dev/null
+++ b/art/typicons/ic_action_user7.svg
@@ -0,0 +1,15 @@
+
+
+
diff --git a/art/typicons/ic_action_user8.svg b/art/typicons/ic_action_user8.svg
new file mode 100644
index 0000000..578db9c
--- /dev/null
+++ b/art/typicons/ic_action_user8.svg
@@ -0,0 +1,11 @@
+
+
+
diff --git a/art/typicons/ic_action_user9.svg b/art/typicons/ic_action_user9.svg
new file mode 100644
index 0000000..745cd50
--- /dev/null
+++ b/art/typicons/ic_action_user9.svg
@@ -0,0 +1,12 @@
+
+
+
diff --git a/custom_rules.xml b/custom_rules.xml
new file mode 100644
index 0000000..9573eba
--- /dev/null
+++ b/custom_rules.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ic_launcher-web.png b/ic_launcher-web.png
new file mode 100644
index 0000000..b0a3edc
Binary files /dev/null and b/ic_launcher-web.png differ
diff --git a/proguard-project.txt b/proguard-project.txt
new file mode 100644
index 0000000..f2fe155
--- /dev/null
+++ b/proguard-project.txt
@@ -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/project.properties b/project.properties
new file mode 100644
index 0000000..a3ee5ab
--- /dev/null
+++ b/project.properties
@@ -0,0 +1,14 @@
+# 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 edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-17
diff --git a/res/animator/slide_in_right.xml b/res/animator/slide_in_right.xml
new file mode 100644
index 0000000..0062f3d
--- /dev/null
+++ b/res/animator/slide_in_right.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/animator/slide_out_left.xml b/res/animator/slide_out_left.xml
new file mode 100644
index 0000000..11ebf8c
--- /dev/null
+++ b/res/animator/slide_out_left.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/drawable-hdpi/ic_action_browse.png b/res/drawable-hdpi/ic_action_browse.png
new file mode 100644
index 0000000..833a51d
Binary files /dev/null and b/res/drawable-hdpi/ic_action_browse.png differ
diff --git a/res/drawable-hdpi/ic_action_clearlog.png b/res/drawable-hdpi/ic_action_clearlog.png
new file mode 100644
index 0000000..2a1ef85
Binary files /dev/null and b/res/drawable-hdpi/ic_action_clearlog.png differ
diff --git a/res/drawable-hdpi/ic_action_delete.png b/res/drawable-hdpi/ic_action_delete.png
new file mode 100644
index 0000000..c3dbcfb
Binary files /dev/null and b/res/drawable-hdpi/ic_action_delete.png differ
diff --git a/res/drawable-hdpi/ic_action_down.png b/res/drawable-hdpi/ic_action_down.png
new file mode 100644
index 0000000..f289eee
Binary files /dev/null and b/res/drawable-hdpi/ic_action_down.png differ
diff --git a/res/drawable-hdpi/ic_action_expand.png b/res/drawable-hdpi/ic_action_expand.png
new file mode 100644
index 0000000..65fd03c
Binary files /dev/null and b/res/drawable-hdpi/ic_action_expand.png differ
diff --git a/res/drawable-hdpi/ic_action_flip.png b/res/drawable-hdpi/ic_action_flip.png
new file mode 100644
index 0000000..63712b3
Binary files /dev/null and b/res/drawable-hdpi/ic_action_flip.png differ
diff --git a/res/drawable-hdpi/ic_action_forward.png b/res/drawable-hdpi/ic_action_forward.png
new file mode 100644
index 0000000..b44256c
Binary files /dev/null and b/res/drawable-hdpi/ic_action_forward.png differ
diff --git a/res/drawable-hdpi/ic_action_help.png b/res/drawable-hdpi/ic_action_help.png
new file mode 100644
index 0000000..9244b83
Binary files /dev/null and b/res/drawable-hdpi/ic_action_help.png differ
diff --git a/res/drawable-hdpi/ic_action_import.png b/res/drawable-hdpi/ic_action_import.png
new file mode 100644
index 0000000..97ca708
Binary files /dev/null and b/res/drawable-hdpi/ic_action_import.png differ
diff --git a/res/drawable-hdpi/ic_action_keyboard.png b/res/drawable-hdpi/ic_action_keyboard.png
new file mode 100644
index 0000000..07af114
Binary files /dev/null and b/res/drawable-hdpi/ic_action_keyboard.png differ
diff --git a/res/drawable-hdpi/ic_action_left.png b/res/drawable-hdpi/ic_action_left.png
new file mode 100644
index 0000000..d03abd3
Binary files /dev/null and b/res/drawable-hdpi/ic_action_left.png differ
diff --git a/res/drawable-hdpi/ic_action_restart.png b/res/drawable-hdpi/ic_action_restart.png
new file mode 100644
index 0000000..1760d9d
Binary files /dev/null and b/res/drawable-hdpi/ic_action_restart.png differ
diff --git a/res/drawable-hdpi/ic_action_restore.png b/res/drawable-hdpi/ic_action_restore.png
new file mode 100644
index 0000000..c8f0830
Binary files /dev/null and b/res/drawable-hdpi/ic_action_restore.png differ
diff --git a/res/drawable-hdpi/ic_action_right.png b/res/drawable-hdpi/ic_action_right.png
new file mode 100644
index 0000000..7cd7f7d
Binary files /dev/null and b/res/drawable-hdpi/ic_action_right.png differ
diff --git a/res/drawable-hdpi/ic_action_save.png b/res/drawable-hdpi/ic_action_save.png
new file mode 100644
index 0000000..827355d
Binary files /dev/null and b/res/drawable-hdpi/ic_action_save.png differ
diff --git a/res/drawable-hdpi/ic_action_submit.png b/res/drawable-hdpi/ic_action_submit.png
new file mode 100644
index 0000000..bb1f231
Binary files /dev/null and b/res/drawable-hdpi/ic_action_submit.png differ
diff --git a/res/drawable-hdpi/ic_action_up.png b/res/drawable-hdpi/ic_action_up.png
new file mode 100644
index 0000000..e766af7
Binary files /dev/null and b/res/drawable-hdpi/ic_action_up.png differ
diff --git a/res/drawable-hdpi/ic_action_user0.png b/res/drawable-hdpi/ic_action_user0.png
new file mode 100644
index 0000000..a9a2f08
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user0.png differ
diff --git a/res/drawable-hdpi/ic_action_user1.png b/res/drawable-hdpi/ic_action_user1.png
new file mode 100644
index 0000000..648f57f
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user1.png differ
diff --git a/res/drawable-hdpi/ic_action_user10.png b/res/drawable-hdpi/ic_action_user10.png
new file mode 100644
index 0000000..008c36b
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user10.png differ
diff --git a/res/drawable-hdpi/ic_action_user11.png b/res/drawable-hdpi/ic_action_user11.png
new file mode 100644
index 0000000..eaeb7e2
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user11.png differ
diff --git a/res/drawable-hdpi/ic_action_user12.png b/res/drawable-hdpi/ic_action_user12.png
new file mode 100644
index 0000000..b452bef
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user12.png differ
diff --git a/res/drawable-hdpi/ic_action_user13.png b/res/drawable-hdpi/ic_action_user13.png
new file mode 100644
index 0000000..61d1477
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user13.png differ
diff --git a/res/drawable-hdpi/ic_action_user14.png b/res/drawable-hdpi/ic_action_user14.png
new file mode 100644
index 0000000..4095c96
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user14.png differ
diff --git a/res/drawable-hdpi/ic_action_user15.png b/res/drawable-hdpi/ic_action_user15.png
new file mode 100644
index 0000000..edc94c1
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user15.png differ
diff --git a/res/drawable-hdpi/ic_action_user16.png b/res/drawable-hdpi/ic_action_user16.png
new file mode 100644
index 0000000..115baa9
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user16.png differ
diff --git a/res/drawable-hdpi/ic_action_user17.png b/res/drawable-hdpi/ic_action_user17.png
new file mode 100644
index 0000000..b1b73aa
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user17.png differ
diff --git a/res/drawable-hdpi/ic_action_user18.png b/res/drawable-hdpi/ic_action_user18.png
new file mode 100644
index 0000000..dace689
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user18.png differ
diff --git a/res/drawable-hdpi/ic_action_user19.png b/res/drawable-hdpi/ic_action_user19.png
new file mode 100644
index 0000000..dace689
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user19.png differ
diff --git a/res/drawable-hdpi/ic_action_user2.png b/res/drawable-hdpi/ic_action_user2.png
new file mode 100644
index 0000000..c946f33
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user2.png differ
diff --git a/res/drawable-hdpi/ic_action_user3.png b/res/drawable-hdpi/ic_action_user3.png
new file mode 100644
index 0000000..9f1ce47
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user3.png differ
diff --git a/res/drawable-hdpi/ic_action_user4.png b/res/drawable-hdpi/ic_action_user4.png
new file mode 100644
index 0000000..e5b1717
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user4.png differ
diff --git a/res/drawable-hdpi/ic_action_user5.png b/res/drawable-hdpi/ic_action_user5.png
new file mode 100644
index 0000000..4c1163f
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user5.png differ
diff --git a/res/drawable-hdpi/ic_action_user6.png b/res/drawable-hdpi/ic_action_user6.png
new file mode 100644
index 0000000..c014fde
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user6.png differ
diff --git a/res/drawable-hdpi/ic_action_user7.png b/res/drawable-hdpi/ic_action_user7.png
new file mode 100644
index 0000000..c4fb219
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user7.png differ
diff --git a/res/drawable-hdpi/ic_action_user8.png b/res/drawable-hdpi/ic_action_user8.png
new file mode 100644
index 0000000..d6abb8d
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user8.png differ
diff --git a/res/drawable-hdpi/ic_action_user9.png b/res/drawable-hdpi/ic_action_user9.png
new file mode 100644
index 0000000..372ed90
Binary files /dev/null and b/res/drawable-hdpi/ic_action_user9.png differ
diff --git a/res/drawable-hdpi/ic_launcher.png b/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..43e454e
Binary files /dev/null and b/res/drawable-hdpi/ic_launcher.png differ
diff --git a/res/drawable-mdpi/ic_action_browse.png b/res/drawable-mdpi/ic_action_browse.png
new file mode 100644
index 0000000..68a44fa
Binary files /dev/null and b/res/drawable-mdpi/ic_action_browse.png differ
diff --git a/res/drawable-mdpi/ic_action_clearlog.png b/res/drawable-mdpi/ic_action_clearlog.png
new file mode 100644
index 0000000..5a1f87f
Binary files /dev/null and b/res/drawable-mdpi/ic_action_clearlog.png differ
diff --git a/res/drawable-mdpi/ic_action_delete.png b/res/drawable-mdpi/ic_action_delete.png
new file mode 100644
index 0000000..f37d7bf
Binary files /dev/null and b/res/drawable-mdpi/ic_action_delete.png differ
diff --git a/res/drawable-mdpi/ic_action_down.png b/res/drawable-mdpi/ic_action_down.png
new file mode 100644
index 0000000..b7866ef
Binary files /dev/null and b/res/drawable-mdpi/ic_action_down.png differ
diff --git a/res/drawable-mdpi/ic_action_expand.png b/res/drawable-mdpi/ic_action_expand.png
new file mode 100644
index 0000000..e6b36b2
Binary files /dev/null and b/res/drawable-mdpi/ic_action_expand.png differ
diff --git a/res/drawable-mdpi/ic_action_flip.png b/res/drawable-mdpi/ic_action_flip.png
new file mode 100644
index 0000000..d8afe20
Binary files /dev/null and b/res/drawable-mdpi/ic_action_flip.png differ
diff --git a/res/drawable-mdpi/ic_action_forward.png b/res/drawable-mdpi/ic_action_forward.png
new file mode 100644
index 0000000..55b4ebc
Binary files /dev/null and b/res/drawable-mdpi/ic_action_forward.png differ
diff --git a/res/drawable-mdpi/ic_action_help.png b/res/drawable-mdpi/ic_action_help.png
new file mode 100644
index 0000000..39c594b
Binary files /dev/null and b/res/drawable-mdpi/ic_action_help.png differ
diff --git a/res/drawable-mdpi/ic_action_import.png b/res/drawable-mdpi/ic_action_import.png
new file mode 100644
index 0000000..7983c82
Binary files /dev/null and b/res/drawable-mdpi/ic_action_import.png differ
diff --git a/res/drawable-mdpi/ic_action_keyboard.png b/res/drawable-mdpi/ic_action_keyboard.png
new file mode 100644
index 0000000..638ef0b
Binary files /dev/null and b/res/drawable-mdpi/ic_action_keyboard.png differ
diff --git a/res/drawable-mdpi/ic_action_left.png b/res/drawable-mdpi/ic_action_left.png
new file mode 100644
index 0000000..75f476a
Binary files /dev/null and b/res/drawable-mdpi/ic_action_left.png differ
diff --git a/res/drawable-mdpi/ic_action_restart.png b/res/drawable-mdpi/ic_action_restart.png
new file mode 100644
index 0000000..5c14a6e
Binary files /dev/null and b/res/drawable-mdpi/ic_action_restart.png differ
diff --git a/res/drawable-mdpi/ic_action_restore.png b/res/drawable-mdpi/ic_action_restore.png
new file mode 100644
index 0000000..086f9b4
Binary files /dev/null and b/res/drawable-mdpi/ic_action_restore.png differ
diff --git a/res/drawable-mdpi/ic_action_right.png b/res/drawable-mdpi/ic_action_right.png
new file mode 100644
index 0000000..5988827
Binary files /dev/null and b/res/drawable-mdpi/ic_action_right.png differ
diff --git a/res/drawable-mdpi/ic_action_save.png b/res/drawable-mdpi/ic_action_save.png
new file mode 100644
index 0000000..eebcf21
Binary files /dev/null and b/res/drawable-mdpi/ic_action_save.png differ
diff --git a/res/drawable-mdpi/ic_action_submit.png b/res/drawable-mdpi/ic_action_submit.png
new file mode 100644
index 0000000..f30aa38
Binary files /dev/null and b/res/drawable-mdpi/ic_action_submit.png differ
diff --git a/res/drawable-mdpi/ic_action_up.png b/res/drawable-mdpi/ic_action_up.png
new file mode 100644
index 0000000..ea857f0
Binary files /dev/null and b/res/drawable-mdpi/ic_action_up.png differ
diff --git a/res/drawable-mdpi/ic_action_user0.png b/res/drawable-mdpi/ic_action_user0.png
new file mode 100644
index 0000000..ac93fdf
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user0.png differ
diff --git a/res/drawable-mdpi/ic_action_user1.png b/res/drawable-mdpi/ic_action_user1.png
new file mode 100644
index 0000000..b2a75d2
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user1.png differ
diff --git a/res/drawable-mdpi/ic_action_user10.png b/res/drawable-mdpi/ic_action_user10.png
new file mode 100644
index 0000000..c337b4d
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user10.png differ
diff --git a/res/drawable-mdpi/ic_action_user11.png b/res/drawable-mdpi/ic_action_user11.png
new file mode 100644
index 0000000..3cccd45
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user11.png differ
diff --git a/res/drawable-mdpi/ic_action_user12.png b/res/drawable-mdpi/ic_action_user12.png
new file mode 100644
index 0000000..1ca38a8
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user12.png differ
diff --git a/res/drawable-mdpi/ic_action_user13.png b/res/drawable-mdpi/ic_action_user13.png
new file mode 100644
index 0000000..ca43013
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user13.png differ
diff --git a/res/drawable-mdpi/ic_action_user14.png b/res/drawable-mdpi/ic_action_user14.png
new file mode 100644
index 0000000..c149f6d
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user14.png differ
diff --git a/res/drawable-mdpi/ic_action_user15.png b/res/drawable-mdpi/ic_action_user15.png
new file mode 100644
index 0000000..a9b802c
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user15.png differ
diff --git a/res/drawable-mdpi/ic_action_user16.png b/res/drawable-mdpi/ic_action_user16.png
new file mode 100644
index 0000000..222ddfa
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user16.png differ
diff --git a/res/drawable-mdpi/ic_action_user17.png b/res/drawable-mdpi/ic_action_user17.png
new file mode 100644
index 0000000..5b2a157
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user17.png differ
diff --git a/res/drawable-mdpi/ic_action_user18.png b/res/drawable-mdpi/ic_action_user18.png
new file mode 100644
index 0000000..bceb6a8
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user18.png differ
diff --git a/res/drawable-mdpi/ic_action_user19.png b/res/drawable-mdpi/ic_action_user19.png
new file mode 100644
index 0000000..bceb6a8
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user19.png differ
diff --git a/res/drawable-mdpi/ic_action_user2.png b/res/drawable-mdpi/ic_action_user2.png
new file mode 100644
index 0000000..cda70fd
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user2.png differ
diff --git a/res/drawable-mdpi/ic_action_user3.png b/res/drawable-mdpi/ic_action_user3.png
new file mode 100644
index 0000000..655276e
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user3.png differ
diff --git a/res/drawable-mdpi/ic_action_user4.png b/res/drawable-mdpi/ic_action_user4.png
new file mode 100644
index 0000000..2bf3a07
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user4.png differ
diff --git a/res/drawable-mdpi/ic_action_user5.png b/res/drawable-mdpi/ic_action_user5.png
new file mode 100644
index 0000000..1ab7622
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user5.png differ
diff --git a/res/drawable-mdpi/ic_action_user6.png b/res/drawable-mdpi/ic_action_user6.png
new file mode 100644
index 0000000..23d3278
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user6.png differ
diff --git a/res/drawable-mdpi/ic_action_user7.png b/res/drawable-mdpi/ic_action_user7.png
new file mode 100644
index 0000000..46bb455
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user7.png differ
diff --git a/res/drawable-mdpi/ic_action_user8.png b/res/drawable-mdpi/ic_action_user8.png
new file mode 100644
index 0000000..3b6ef65
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user8.png differ
diff --git a/res/drawable-mdpi/ic_action_user9.png b/res/drawable-mdpi/ic_action_user9.png
new file mode 100644
index 0000000..32a10da
Binary files /dev/null and b/res/drawable-mdpi/ic_action_user9.png differ
diff --git a/res/drawable-mdpi/ic_launcher.png b/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..b4fe254
Binary files /dev/null and b/res/drawable-mdpi/ic_launcher.png differ
diff --git a/res/drawable-xhdpi/ic_action_browse.png b/res/drawable-xhdpi/ic_action_browse.png
new file mode 100644
index 0000000..77fa490
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_browse.png differ
diff --git a/res/drawable-xhdpi/ic_action_clearlog.png b/res/drawable-xhdpi/ic_action_clearlog.png
new file mode 100644
index 0000000..9588ec1
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_clearlog.png differ
diff --git a/res/drawable-xhdpi/ic_action_delete.png b/res/drawable-xhdpi/ic_action_delete.png
new file mode 100644
index 0000000..01dcdf8
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_delete.png differ
diff --git a/res/drawable-xhdpi/ic_action_down.png b/res/drawable-xhdpi/ic_action_down.png
new file mode 100644
index 0000000..92755a3
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_down.png differ
diff --git a/res/drawable-xhdpi/ic_action_expand.png b/res/drawable-xhdpi/ic_action_expand.png
new file mode 100644
index 0000000..25f4060
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_expand.png differ
diff --git a/res/drawable-xhdpi/ic_action_flip.png b/res/drawable-xhdpi/ic_action_flip.png
new file mode 100644
index 0000000..a38ff22
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_flip.png differ
diff --git a/res/drawable-xhdpi/ic_action_forward.png b/res/drawable-xhdpi/ic_action_forward.png
new file mode 100644
index 0000000..be3fcbb
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_forward.png differ
diff --git a/res/drawable-xhdpi/ic_action_help.png b/res/drawable-xhdpi/ic_action_help.png
new file mode 100644
index 0000000..9d36950
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_help.png differ
diff --git a/res/drawable-xhdpi/ic_action_import.png b/res/drawable-xhdpi/ic_action_import.png
new file mode 100644
index 0000000..25b343e
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_import.png differ
diff --git a/res/drawable-xhdpi/ic_action_keyboard.png b/res/drawable-xhdpi/ic_action_keyboard.png
new file mode 100644
index 0000000..dc0a61c
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_keyboard.png differ
diff --git a/res/drawable-xhdpi/ic_action_left.png b/res/drawable-xhdpi/ic_action_left.png
new file mode 100644
index 0000000..4e9b92e
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_left.png differ
diff --git a/res/drawable-xhdpi/ic_action_restart.png b/res/drawable-xhdpi/ic_action_restart.png
new file mode 100644
index 0000000..62aee0b
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_restart.png differ
diff --git a/res/drawable-xhdpi/ic_action_restore.png b/res/drawable-xhdpi/ic_action_restore.png
new file mode 100644
index 0000000..54b58f9
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_restore.png differ
diff --git a/res/drawable-xhdpi/ic_action_right.png b/res/drawable-xhdpi/ic_action_right.png
new file mode 100644
index 0000000..458d98e
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_right.png differ
diff --git a/res/drawable-xhdpi/ic_action_save.png b/res/drawable-xhdpi/ic_action_save.png
new file mode 100644
index 0000000..2e7c579
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_save.png differ
diff --git a/res/drawable-xhdpi/ic_action_submit.png b/res/drawable-xhdpi/ic_action_submit.png
new file mode 100644
index 0000000..2b14dca
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_submit.png differ
diff --git a/res/drawable-xhdpi/ic_action_up.png b/res/drawable-xhdpi/ic_action_up.png
new file mode 100644
index 0000000..bfa5ee7
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_up.png differ
diff --git a/res/drawable-xhdpi/ic_action_user0.png b/res/drawable-xhdpi/ic_action_user0.png
new file mode 100644
index 0000000..1ae1a02
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user0.png differ
diff --git a/res/drawable-xhdpi/ic_action_user1.png b/res/drawable-xhdpi/ic_action_user1.png
new file mode 100644
index 0000000..6e2ed9a
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user1.png differ
diff --git a/res/drawable-xhdpi/ic_action_user10.png b/res/drawable-xhdpi/ic_action_user10.png
new file mode 100644
index 0000000..1df0ad0
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user10.png differ
diff --git a/res/drawable-xhdpi/ic_action_user11.png b/res/drawable-xhdpi/ic_action_user11.png
new file mode 100644
index 0000000..940a58e
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user11.png differ
diff --git a/res/drawable-xhdpi/ic_action_user12.png b/res/drawable-xhdpi/ic_action_user12.png
new file mode 100644
index 0000000..a4e776b
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user12.png differ
diff --git a/res/drawable-xhdpi/ic_action_user13.png b/res/drawable-xhdpi/ic_action_user13.png
new file mode 100644
index 0000000..2865ae5
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user13.png differ
diff --git a/res/drawable-xhdpi/ic_action_user14.png b/res/drawable-xhdpi/ic_action_user14.png
new file mode 100644
index 0000000..c7691a2
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user14.png differ
diff --git a/res/drawable-xhdpi/ic_action_user15.png b/res/drawable-xhdpi/ic_action_user15.png
new file mode 100644
index 0000000..6bbee8e
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user15.png differ
diff --git a/res/drawable-xhdpi/ic_action_user16.png b/res/drawable-xhdpi/ic_action_user16.png
new file mode 100644
index 0000000..a481c5c
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user16.png differ
diff --git a/res/drawable-xhdpi/ic_action_user17.png b/res/drawable-xhdpi/ic_action_user17.png
new file mode 100644
index 0000000..08411d5
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user17.png differ
diff --git a/res/drawable-xhdpi/ic_action_user18.png b/res/drawable-xhdpi/ic_action_user18.png
new file mode 100644
index 0000000..29b7552
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user18.png differ
diff --git a/res/drawable-xhdpi/ic_action_user19.png b/res/drawable-xhdpi/ic_action_user19.png
new file mode 100644
index 0000000..29b7552
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user19.png differ
diff --git a/res/drawable-xhdpi/ic_action_user2.png b/res/drawable-xhdpi/ic_action_user2.png
new file mode 100644
index 0000000..f15b85b
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user2.png differ
diff --git a/res/drawable-xhdpi/ic_action_user3.png b/res/drawable-xhdpi/ic_action_user3.png
new file mode 100644
index 0000000..ddc14d5
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user3.png differ
diff --git a/res/drawable-xhdpi/ic_action_user4.png b/res/drawable-xhdpi/ic_action_user4.png
new file mode 100644
index 0000000..c57769f
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user4.png differ
diff --git a/res/drawable-xhdpi/ic_action_user5.png b/res/drawable-xhdpi/ic_action_user5.png
new file mode 100644
index 0000000..34eed53
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user5.png differ
diff --git a/res/drawable-xhdpi/ic_action_user6.png b/res/drawable-xhdpi/ic_action_user6.png
new file mode 100644
index 0000000..0275432
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user6.png differ
diff --git a/res/drawable-xhdpi/ic_action_user7.png b/res/drawable-xhdpi/ic_action_user7.png
new file mode 100644
index 0000000..0e0801b
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user7.png differ
diff --git a/res/drawable-xhdpi/ic_action_user8.png b/res/drawable-xhdpi/ic_action_user8.png
new file mode 100644
index 0000000..02dbf49
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user8.png differ
diff --git a/res/drawable-xhdpi/ic_action_user9.png b/res/drawable-xhdpi/ic_action_user9.png
new file mode 100644
index 0000000..5b403b0
Binary files /dev/null and b/res/drawable-xhdpi/ic_action_user9.png differ
diff --git a/res/drawable-xhdpi/ic_launcher.png b/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..7bb17ac
Binary files /dev/null and b/res/drawable-xhdpi/ic_launcher.png differ
diff --git a/res/drawable-xxhdpi/ic_action_down.png b/res/drawable-xxhdpi/ic_action_down.png
new file mode 100644
index 0000000..e5b5c79
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_down.png differ
diff --git a/res/drawable-xxhdpi/ic_action_forward.png b/res/drawable-xxhdpi/ic_action_forward.png
new file mode 100644
index 0000000..e414ae1
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_forward.png differ
diff --git a/res/drawable-xxhdpi/ic_action_keyboard.png b/res/drawable-xxhdpi/ic_action_keyboard.png
new file mode 100644
index 0000000..da4f5e2
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_keyboard.png differ
diff --git a/res/drawable-xxhdpi/ic_action_left.png b/res/drawable-xxhdpi/ic_action_left.png
new file mode 100644
index 0000000..f329ed8
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_left.png differ
diff --git a/res/drawable-xxhdpi/ic_action_right.png b/res/drawable-xxhdpi/ic_action_right.png
new file mode 100644
index 0000000..c1283e7
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_right.png differ
diff --git a/res/drawable-xxhdpi/ic_action_up.png b/res/drawable-xxhdpi/ic_action_up.png
new file mode 100644
index 0000000..a7e96cb
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_up.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user0.png b/res/drawable-xxhdpi/ic_action_user0.png
new file mode 100644
index 0000000..324ecd0
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user0.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user1.png b/res/drawable-xxhdpi/ic_action_user1.png
new file mode 100644
index 0000000..655d4cc
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user1.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user10.png b/res/drawable-xxhdpi/ic_action_user10.png
new file mode 100644
index 0000000..f4730f9
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user10.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user11.png b/res/drawable-xxhdpi/ic_action_user11.png
new file mode 100644
index 0000000..f4ec467
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user11.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user12.png b/res/drawable-xxhdpi/ic_action_user12.png
new file mode 100644
index 0000000..1dbe344
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user12.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user13.png b/res/drawable-xxhdpi/ic_action_user13.png
new file mode 100644
index 0000000..ed86771
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user13.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user14.png b/res/drawable-xxhdpi/ic_action_user14.png
new file mode 100644
index 0000000..90fc1aa
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user14.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user15.png b/res/drawable-xxhdpi/ic_action_user15.png
new file mode 100644
index 0000000..97f9d3a
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user15.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user16.png b/res/drawable-xxhdpi/ic_action_user16.png
new file mode 100644
index 0000000..a85e9f4
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user16.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user17.png b/res/drawable-xxhdpi/ic_action_user17.png
new file mode 100644
index 0000000..21e31fb
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user17.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user18.png b/res/drawable-xxhdpi/ic_action_user18.png
new file mode 100644
index 0000000..d52fb38
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user18.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user19.png b/res/drawable-xxhdpi/ic_action_user19.png
new file mode 100644
index 0000000..d52fb38
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user19.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user2.png b/res/drawable-xxhdpi/ic_action_user2.png
new file mode 100644
index 0000000..795abc8
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user2.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user3.png b/res/drawable-xxhdpi/ic_action_user3.png
new file mode 100644
index 0000000..82ef0c5
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user3.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user4.png b/res/drawable-xxhdpi/ic_action_user4.png
new file mode 100644
index 0000000..01898a4
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user4.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user5.png b/res/drawable-xxhdpi/ic_action_user5.png
new file mode 100644
index 0000000..b671a43
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user5.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user6.png b/res/drawable-xxhdpi/ic_action_user6.png
new file mode 100644
index 0000000..b9093ab
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user6.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user7.png b/res/drawable-xxhdpi/ic_action_user7.png
new file mode 100644
index 0000000..ea698df
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user7.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user8.png b/res/drawable-xxhdpi/ic_action_user8.png
new file mode 100644
index 0000000..536256f
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user8.png differ
diff --git a/res/drawable-xxhdpi/ic_action_user9.png b/res/drawable-xxhdpi/ic_action_user9.png
new file mode 100644
index 0000000..add2db3
Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_user9.png differ
diff --git a/res/drawable-xxhdpi/ic_launcher.png b/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..d9eda0a
Binary files /dev/null and b/res/drawable-xxhdpi/ic_launcher.png differ
diff --git a/res/drawable/alice_box.9.png b/res/drawable/alice_box.9.png
new file mode 100644
index 0000000..00d089f
Binary files /dev/null and b/res/drawable/alice_box.9.png differ
diff --git a/res/drawable/alice_btn_pressed.xml b/res/drawable/alice_btn_pressed.xml
new file mode 100644
index 0000000..018431b
--- /dev/null
+++ b/res/drawable/alice_btn_pressed.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/drawable/alice_btn_selector.xml b/res/drawable/alice_btn_selector.xml
new file mode 100644
index 0000000..aa314af
--- /dev/null
+++ b/res/drawable/alice_btn_selector.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/drawable/alice_bubble_left.9.png b/res/drawable/alice_bubble_left.9.png
new file mode 100644
index 0000000..3b92d22
Binary files /dev/null and b/res/drawable/alice_bubble_left.9.png differ
diff --git a/res/drawable/alice_bubble_right.9.png b/res/drawable/alice_bubble_right.9.png
new file mode 100644
index 0000000..19ef6a8
Binary files /dev/null and b/res/drawable/alice_bubble_right.9.png differ
diff --git a/res/drawable/alice_inputbox.9.png b/res/drawable/alice_inputbox.9.png
new file mode 100644
index 0000000..41ccd68
Binary files /dev/null and b/res/drawable/alice_inputbox.9.png differ
diff --git a/res/drawable/alice_item_pressed.xml b/res/drawable/alice_item_pressed.xml
new file mode 100644
index 0000000..49717ea
--- /dev/null
+++ b/res/drawable/alice_item_pressed.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/drawable/alice_lst_selector.xml b/res/drawable/alice_lst_selector.xml
new file mode 100644
index 0000000..2afc967
--- /dev/null
+++ b/res/drawable/alice_lst_selector.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/drawable/nemo_box.9.png b/res/drawable/nemo_box.9.png
new file mode 100644
index 0000000..882a1c8
Binary files /dev/null and b/res/drawable/nemo_box.9.png differ
diff --git a/res/drawable/nemo_btn_pressed.xml b/res/drawable/nemo_btn_pressed.xml
new file mode 100644
index 0000000..d37e894
--- /dev/null
+++ b/res/drawable/nemo_btn_pressed.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/drawable/nemo_btn_selector.xml b/res/drawable/nemo_btn_selector.xml
new file mode 100644
index 0000000..5436770
--- /dev/null
+++ b/res/drawable/nemo_btn_selector.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/drawable/nemo_bubble_left.9.png b/res/drawable/nemo_bubble_left.9.png
new file mode 100644
index 0000000..f961be0
Binary files /dev/null and b/res/drawable/nemo_bubble_left.9.png differ
diff --git a/res/drawable/nemo_bubble_right.9.png b/res/drawable/nemo_bubble_right.9.png
new file mode 100644
index 0000000..2e5360f
Binary files /dev/null and b/res/drawable/nemo_bubble_right.9.png differ
diff --git a/res/drawable/nemo_item_pressed.xml b/res/drawable/nemo_item_pressed.xml
new file mode 100644
index 0000000..8e695af
--- /dev/null
+++ b/res/drawable/nemo_item_pressed.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/drawable/nemo_lst_selector.xml b/res/drawable/nemo_lst_selector.xml
new file mode 100644
index 0000000..c9a7f24
--- /dev/null
+++ b/res/drawable/nemo_lst_selector.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/drawable/shadedregion.9.png b/res/drawable/shadedregion.9.png
new file mode 100644
index 0000000..00f2e08
Binary files /dev/null and b/res/drawable/shadedregion.9.png differ
diff --git a/res/layout/activity_game.xml b/res/layout/activity_game.xml
new file mode 100644
index 0000000..9f6ac31
--- /dev/null
+++ b/res/layout/activity_game.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/activity_main.xml b/res/layout/activity_main.xml
new file mode 100644
index 0000000..65ff9d6
--- /dev/null
+++ b/res/layout/activity_main.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/fragment_input.xml b/res/layout/fragment_input.xml
new file mode 100644
index 0000000..c4122a3
--- /dev/null
+++ b/res/layout/fragment_input.xml
@@ -0,0 +1,119 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/fragment_library_grid.xml b/res/layout/fragment_library_grid.xml
new file mode 100644
index 0000000..5993b3c
--- /dev/null
+++ b/res/layout/fragment_library_grid.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/fragment_library_list.xml b/res/layout/fragment_library_list.xml
new file mode 100644
index 0000000..168fef7
--- /dev/null
+++ b/res/layout/fragment_library_list.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/fragment_state.xml b/res/layout/fragment_state.xml
new file mode 100644
index 0000000..a7baa66
--- /dev/null
+++ b/res/layout/fragment_state.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/library_item.xml b/res/layout/library_item.xml
new file mode 100644
index 0000000..faae084
--- /dev/null
+++ b/res/layout/library_item.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/quickcmdsettings.xml b/res/layout/quickcmdsettings.xml
new file mode 100644
index 0000000..8a955e5
--- /dev/null
+++ b/res/layout/quickcmdsettings.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/story_item.xml b/res/layout/story_item.xml
new file mode 100644
index 0000000..80ba695
--- /dev/null
+++ b/res/layout/story_item.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/style_cmdbutton.xml b/res/layout/style_cmdbutton.xml
new file mode 100644
index 0000000..809137c
--- /dev/null
+++ b/res/layout/style_cmdbutton.xml
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/res/menu/game.xml b/res/menu/game.xml
new file mode 100644
index 0000000..c46a9b2
--- /dev/null
+++ b/res/menu/game.xml
@@ -0,0 +1,36 @@
+
\ No newline at end of file
diff --git a/res/menu/library_fragment.xml b/res/menu/library_fragment.xml
new file mode 100644
index 0000000..0d2b97d
--- /dev/null
+++ b/res/menu/library_fragment.xml
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/res/menu/main.xml b/res/menu/main.xml
new file mode 100644
index 0000000..d78fee3
--- /dev/null
+++ b/res/menu/main.xml
@@ -0,0 +1,15 @@
+
\ No newline at end of file
diff --git a/res/values-large/refs.xml b/res/values-large/refs.xml
new file mode 100644
index 0000000..9db98de
--- /dev/null
+++ b/res/values-large/refs.xml
@@ -0,0 +1,12 @@
+
+
+
+ - @layout/fragment_library_grid
+
+
\ No newline at end of file
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..d7cc90c
--- /dev/null
+++ b/res/values-sw600dp/dimens.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/res/values-sw600dp/refs.xml b/res/values-sw600dp/refs.xml
new file mode 100644
index 0000000..9db98de
--- /dev/null
+++ b/res/values-sw600dp/refs.xml
@@ -0,0 +1,12 @@
+
+
+
+ - @layout/fragment_library_grid
+
+
\ No newline at end of file
diff --git a/res/values-sw720dp-land/dimens.xml b/res/values-sw720dp-land/dimens.xml
new file mode 100644
index 0000000..1b9fc52
--- /dev/null
+++ b/res/values-sw720dp-land/dimens.xml
@@ -0,0 +1,9 @@
+
+
+
+ 128dp
+
+
\ No newline at end of file
diff --git a/res/values-v11/styles.xml b/res/values-v11/styles.xml
new file mode 100644
index 0000000..27877bb
--- /dev/null
+++ b/res/values-v11/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/values-v14/styles.xml b/res/values-v14/styles.xml
new file mode 100644
index 0000000..686b0d9
--- /dev/null
+++ b/res/values-v14/styles.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
new file mode 100644
index 0000000..bea9c41
--- /dev/null
+++ b/res/values/colors.xml
@@ -0,0 +1,29 @@
+
+
+
+ #FFFFFF
+ #000000
+
+ #154a5e
+ #FF888888
+ #00000000
+ #FFFFFFFF
+ #FFBBBBBB
+ #FFAAAAAA
+ #FF000000
+ #FF999999
+ #FF000000
+
+
+
+ #FFF373
+ #63411F
+ #00000000
+ #FF8400
+ #FFBBBBBB
+ #FFAAAAAA
+ #FF000000
+ #FF999999
+ #FF000000
+
+
\ No newline at end of file
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
new file mode 100644
index 0000000..1149fae
--- /dev/null
+++ b/res/values/dimens.xml
@@ -0,0 +1,13 @@
+
+
+
+ 16dp
+ 16dp
+
+ 75dp
+ 20dp
+
+ 75dp
+ 20dp
+
+
\ No newline at end of file
diff --git a/res/values/refs.xml b/res/values/refs.xml
new file mode 100644
index 0000000..6fdba84
--- /dev/null
+++ b/res/values/refs.xml
@@ -0,0 +1,12 @@
+
+
+
+ - @layout/fragment_library_list
+
+
\ No newline at end of file
diff --git a/res/values/strings.xml b/res/values/strings.xml
new file mode 100644
index 0000000..c4cc6d8
--- /dev/null
+++ b/res/values/strings.xml
@@ -0,0 +1,62 @@
+
+
+
+ Text Fiction
+ Settings
+ Hello world!
+ Rate this app?
+ Hi,\nseems like you find this app useful. Would you consider rating it? This will only take a minute of your time, but encourages further development.
+ Sure!
+ No thanks
+ Later
+ Corrupt game file
+ GameActivity
+ Hello blank fragment
+ What next?
+ look
+ examine
+ read
+ yes
+ no
+ open
+ close
+ inventory
+ get
+ drop
+ take all
+ wait
+ use
+ again
+ Can\'t bind empty commandline to button!
+ Add
+ Really delete?
+ Your library is currently empty! To add games, select \'Browse Catalog\' from the menu. Use \'Import\' if your browser does not hand over your downloads automatically.
+ Save
+ Restore
+ Restart
+ Browse Catalog
+ http://www.onyxbits.de/textfiction/games
+ http://www.onyxbits.de/textfiction/help
+ Import
+ Select games to import
+ Failure!
+ No games found in the download folder!
+ Clear
+ Execute at once
+ Help
+ %1$s\nScore: %2$d Turn: %3$d
+ %1$s\n%2$s
+ Change Commmand Button
+ Corrupt game file
+ Flip view
+ Please confirm
+ Really restart the game?
+ Restore game
+ No savegames available
+ Game restored
+ Restore failed
+ Save game
+ Game saved
+
+
+
\ No newline at end of file
diff --git a/res/values/styles.xml b/res/values/styles.xml
new file mode 100644
index 0000000..622d0e0
--- /dev/null
+++ b/res/values/styles.xml
@@ -0,0 +1,209 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/de/onyxbits/textfiction/AppRater.java b/src/de/onyxbits/textfiction/AppRater.java
new file mode 100644
index 0000000..a35f266
--- /dev/null
+++ b/src/de/onyxbits/textfiction/AppRater.java
@@ -0,0 +1,130 @@
+package de.onyxbits.textfiction;
+
+import android.app.AlertDialog;
+import android.content.ActivityNotFoundException;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.pm.PackageManager;
+import android.net.Uri;
+import android.util.Log;
+
+/**
+ * Ask the user about reviewing the app on Google Play after a reasonable
+ * amount of time and launches.
+ */
+class AppRater implements DialogInterface.OnClickListener {
+
+ private static final int DAYS_UNTIL_PROMPT = 7;
+ private static final int LAUNCHES_UNTIL_PROMPT = 14;
+ private static final String PREFSFILE = "apprater";
+
+ private Context context;
+
+ private AppRater(Context context) {
+ this.context = context;
+ }
+
+ /**
+ * Should be called on every Activity.onCreate()
. Checks if the
+ * trial period is over and if so brings up a notification dialog.
+ *
+ * @param ctx
+ * The application context.
+ */
+ public static void appLaunched(Context ctx) {
+ try {
+ // Don't even bother if not installed from Google Play
+ PackageManager pm = ctx.getPackageManager();
+ String pn = ctx.getPackageName();
+ String inst = pm.getInstallerPackageName(pn);
+ if (inst == null || !(inst.startsWith("com.google")
+ || inst.startsWith("com.android"))) {
+ return;
+ }
+ }
+ catch (Exception exp) {
+ Log.w("AppRater",exp);
+ // Just bailout. Don't even try recovery.
+ return;
+ }
+
+ SharedPreferences prefs = ctx.getSharedPreferences(PREFSFILE, 0);
+ if (prefs.getBoolean("dontshowagain", false)) {
+ return;
+ }
+
+ SharedPreferences.Editor editor = prefs.edit();
+
+ // Increment launch counter
+ long launch_count = prefs.getLong("launch_count", 0) + 1;
+ editor.putLong("launch_count", launch_count);
+
+ // Get date of first launch
+ Long date_firstLaunch = prefs.getLong("date_firstlaunch", 0);
+ if (date_firstLaunch == 0) {
+ date_firstLaunch = System.currentTimeMillis();
+ editor.putLong("date_firstlaunch", date_firstLaunch);
+ }
+ editor.commit();
+
+ // Wait at least n days before opening
+ if (launch_count >= LAUNCHES_UNTIL_PROMPT) {
+ if (System.currentTimeMillis() >= date_firstLaunch
+ + (DAYS_UNTIL_PROMPT * 24 * 60 * 60 * 1000)) {
+ showRateDialog(ctx);
+ }
+ }
+ }
+
+ /**
+ * Just bring up the rating dialog without checking whether or not the trial
+ * period has ended
+ *
+ * @param ctx
+ * application context
+ */
+ public static void showRateDialog(Context ctx) {
+ AppRater rater = new AppRater(ctx);
+ AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
+ builder.setTitle(R.string.apprater_title);
+ builder.setMessage(R.string.apprater_message);
+ builder.setPositiveButton(R.string.apprater_positive, rater);
+ builder.setNegativeButton(R.string.apprater_negative, rater);
+ builder.setNeutralButton(R.string.apprater_neutral, rater);
+ builder.create().show();
+ }
+
+ @Override
+ public void onClick(DialogInterface di, int id) {
+ SharedPreferences.Editor editor = context
+ .getSharedPreferences(PREFSFILE, 0).edit();
+ switch (id) {
+ case DialogInterface.BUTTON_POSITIVE: {
+ try {
+ context.startActivity(new Intent(Intent.ACTION_VIEW, Uri
+ .parse("market://details?id=" + context.getPackageName())));
+ }
+ catch (ActivityNotFoundException exp) {
+
+ }
+ // Fall through intended!
+ }
+ case DialogInterface.BUTTON_NEGATIVE: {
+ editor.putBoolean("dontshowagain", true);
+ break;
+ }
+ case DialogInterface.BUTTON_NEUTRAL:
+ default: {
+ // Did the user select "Later" because s/he does not have network access
+ // right now or because s/he wants to extend the trial period? Let's
+ // assume the later and reset the launch counter, as it is the less
+ // pesky option.
+ editor.putLong("launch_count", 0);
+ }
+ }
+ editor.commit();
+ di.dismiss();
+ }
+}
diff --git a/src/de/onyxbits/textfiction/FileUtil.java b/src/de/onyxbits/textfiction/FileUtil.java
new file mode 100644
index 0000000..9df282c
--- /dev/null
+++ b/src/de/onyxbits/textfiction/FileUtil.java
@@ -0,0 +1,164 @@
+package de.onyxbits.textfiction;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Comparator;
+
+import android.os.Environment;
+
+public class FileUtil implements Comparator {
+
+ /**
+ * Datadir on the external storage
+ */
+ public static final String HOMEDIR = "TextFiction";
+
+ /**
+ * Where the games are stored (relative to the HOMEDIR or app data dir).
+ */
+ public static final String GAMEDIR = "games";
+
+ /**
+ * Where to keep the auto save files
+ */
+ public static final String AUTOSAVEDIR = "autosave";
+
+ /**
+ * Where the save game files are stored (relative to the HOMEDIR or app data
+ * dir).
+ */
+ public static final String SAVEDIR = "savegames";
+
+ private static final File library;
+ private static final File autosaves;
+ private static final File saves;
+
+ /**
+ * Just make sure we got all of our directories.
+ */
+ static {
+ File root = Environment.getExternalStorageDirectory();
+ library = new File(new File(root, HOMEDIR), GAMEDIR);
+ autosaves = new File(new File(root, HOMEDIR), AUTOSAVEDIR);
+ saves = new File(new File(root, HOMEDIR), SAVEDIR);
+ library.mkdirs();
+ autosaves.mkdirs();
+ saves.mkdirs();
+ }
+
+ public static File[] listGames() {
+
+ return library.listFiles();
+ }
+
+ /**
+ * List all the save files for a game
+ *
+ * @param game
+ * the game in question
+ * @return list of files in the savegamedir
+ */
+ public static File[] listSaveGames(File game) {
+ File f = getSaveGameDir(game);
+ File[] ret = f.listFiles();
+ if (ret == null) {
+ return new File[0];
+ }
+ Arrays.sort(ret, new FileUtil());
+ return ret;
+ }
+
+ /**
+ * List all the saves for a game
+ *
+ * @param game
+ * the game in question
+ * @return the filenames of the save games.
+ */
+ public static String[] listSaveName(File game) {
+ File[] f = listSaveGames(game);
+ String ret[] = new String[f.length];
+ for (int i = 0; i < ret.length; i++) {
+ ret[i] = f[i].getName();
+ }
+ return ret;
+ }
+
+ /**
+ *
+ */
+ public FileUtil() {
+ }
+
+ /**
+ * Copies files to the library
+ *
+ * @param src
+ * the file to copy
+ * @throws IOException
+ * if something goes wrong
+ */
+ public static void importGame(File src) throws IOException {
+ File dst = new File(library, src.getName());
+ byte[] buf = new byte[1024];
+ FileInputStream fin = new FileInputStream(src);
+ FileOutputStream fout = new FileOutputStream(dst);
+
+ int len;
+ while ((len = fin.read(buf)) > 0) {
+ fout.write(buf, 0, len);
+ }
+ getSaveGameDir(dst).mkdirs();
+ fin.close();
+ fout.close();
+ }
+
+ /**
+ * Delete a game and all other files belonging to it.
+ *
+ * @param game
+ * the game file
+ */
+ public static void deleteGame(File game) {
+ getAutosave(game).delete();
+ File[] lst = getSaveGameDir(game).listFiles();
+ for (File f : lst) {
+ f.delete();
+ }
+ getSaveGameDir(game).delete();
+ game.delete();
+ }
+
+ /**
+ * Query the autosave for a game
+ *
+ * @param game
+ * the game file
+ * @return the autosave file for the game.
+ */
+ public static File getAutosave(File game) {
+ return new File(autosaves, game.getName());
+ }
+
+ /**
+ * Get the directory where a game keeps its savegames
+ *
+ * @param game
+ * the game in question
+ * @return a directory for saving games.
+ */
+ public static File getSaveGameDir(File game) {
+ File ret =new File(saves, game.getName());
+ ret.mkdirs();
+ return ret;
+ }
+
+ @Override
+ public int compare(File lhs, File rhs) {
+ return Long.valueOf(rhs.lastModified()).compareTo(lhs.lastModified());
+ }
+
+}
diff --git a/src/de/onyxbits/textfiction/GameActivity.java b/src/de/onyxbits/textfiction/GameActivity.java
new file mode 100644
index 0000000..b20723d
--- /dev/null
+++ b/src/de/onyxbits/textfiction/GameActivity.java
@@ -0,0 +1,507 @@
+package de.onyxbits.textfiction;
+
+import java.io.File;
+
+import de.onyxbits.textfiction.input.InputFragment;
+import de.onyxbits.textfiction.input.WordExtractor;
+import de.onyxbits.textfiction.zengine.ZMachine;
+import de.onyxbits.textfiction.zengine.ZState;
+import de.onyxbits.textfiction.zengine.ZStatus;
+import de.onyxbits.textfiction.zengine.ZWindow;
+
+import android.net.Uri;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.GestureDetector;
+import android.view.GestureDetector.OnGestureListener;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.View.OnTouchListener;
+import android.view.Window;
+import android.view.animation.AnimationUtils;
+import android.widget.EditText;
+import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.Toast;
+import android.widget.ViewFlipper;
+import android.support.v4.app.FragmentActivity;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.NavUtils;
+import android.annotation.TargetApi;
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Build;
+
+/**
+ * The activity where actual gameplay takes place.
+ *
+ * @author patrick
+ *
+ */
+public class GameActivity extends FragmentActivity implements
+ OnGestureListener, OnTouchListener, DialogInterface.OnClickListener {
+
+ /**
+ * This activity must be started through an intent and be passed the filename
+ * of the game via this extra.
+ */
+ public static final String LOADFILE = "loadfile";
+
+ /**
+ * How many items to keep in the messagebuffer at most. Note: this should be
+ * an odd number so the log starts with a narrator entry.
+ */
+ public static final int MAXMESSAGES = 81;
+
+ private static final float SWIPE_THRESHOLD = 100;
+
+ private static final float SWIPE_VELOCITY_THRESHOLD = 100;
+
+ private static final int PENDING_NONE = 0;
+ private static final int PENDING_RESTART = 1;
+ private static final int PENDING_RESTORE = 2;
+ private static final int PENDING_SAVE = 3;
+
+ /**
+ * Displays the message log
+ */
+ private ListView storyBoard;
+
+ /**
+ * Adapter for the story list
+ */
+ private StoryAdapter messages;
+
+ /**
+ * The "upper window" of the z-machine containing the status part
+ */
+ private TextView statusWindow;
+
+ /**
+ * Holds stuff that needs to survive config changes (e.g. screen rotation).
+ */
+ private RetainerFragment retainerFragment;
+
+ /**
+ * The input prompt
+ */
+ private InputFragment inputFragment;
+
+ /**
+ * For flinging between the storyboard and the status screen
+ */
+ private GestureDetector gestureDetector;
+
+ /**
+ * Contains story- and status screen.
+ */
+ private ViewFlipper windowFlipper;
+
+ /**
+ * For entering a filename to save the current game as.
+ */
+ private EditText saveName;
+
+ /**
+ * The game playing in this activity
+ */
+ private File storyFile;
+
+ /**
+ * State variable for when we are showing a "confirm" dialog.
+ */
+ private int pendingAction = PENDING_NONE;
+
+ /**
+ * Reference to the "save" entry in the menu
+ */
+ private MenuItem menuSave;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ LayoutInflater infl = getLayoutInflater();
+ requestWindowFeature(Window.FEATURE_PROGRESS);
+
+ View content = infl.inflate(R.layout.activity_game, null);
+ setContentView(content);
+
+ FragmentManager fm = getSupportFragmentManager();
+ inputFragment = (InputFragment) fm.findFragmentById(R.id.fragment_input);
+ retainerFragment = (RetainerFragment) fm.findFragmentByTag("retainer");
+ if (retainerFragment == null) {
+ // First start
+ retainerFragment = new RetainerFragment();
+ fm.beginTransaction().add(retainerFragment, "retainer").commit();
+ }
+ else {
+ // Likely a restart because of the screen being rotated. This may have
+ // happened while loading, so don't figure if we don't have an engine.
+ if (retainerFragment.engine != null) {
+ figurePromptStyle();
+ }
+ }
+ storyFile = new File(getIntent().getStringExtra(LOADFILE));
+ setTitle(storyFile.getName());
+
+ // Show the Up button in the action bar.
+ setupActionBar();
+
+ gestureDetector = new GestureDetector(this, this);
+
+ storyBoard = (ListView) content.findViewById(R.id.storyboard);
+ storyBoard.setOnTouchListener(this);
+ WordExtractor we = new WordExtractor(this, inputFragment);
+ messages = new StoryAdapter(this, 0, retainerFragment.messageBuffer, we);
+ storyBoard.setAdapter(messages);
+
+ windowFlipper = (ViewFlipper) content.findViewById(R.id.window_flipper);
+ statusWindow = (TextView) content.findViewById(R.id.status);
+ statusWindow.setText(retainerFragment.upperWindow);
+ content.findViewById(R.id.scroll_status).setOnTouchListener(this);
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ }
+
+ /**
+ * Set up the {@link android.app.ActionBar}, if the API is available.
+ */
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
+ private void setupActionBar() {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
+ getActionBar().setDisplayHomeAsUpEnabled(true);
+ getActionBar().setSubtitle(storyFile.getName());
+ setTitle(R.string.app_name);
+ }
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu; this adds items to the action bar if it is present.
+ super.onCreateOptionsMenu(menu);
+ getMenuInflater().inflate(R.menu.game, menu);
+ menuSave = menu.findItem(R.id.mi_save);
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.mi_flip_view: {
+ flipView(windowFlipper.getCurrentView() != storyBoard);
+ return true;
+ }
+ case R.id.mi_save: {
+ pendingAction = PENDING_SAVE;
+ saveName = new EditText(this);
+ saveName.setSingleLine(true);
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle(R.string.title_save_game)
+ .setPositiveButton(android.R.string.ok, this).setView(saveName)
+ .show();
+ return true;
+ }
+ case R.id.mi_restore: {
+ String[] sg = FileUtil.listSaveName(storyFile);
+ if (sg.length > 0) {
+ pendingAction = PENDING_RESTORE;
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle(R.string.title_restore_game).setItems(sg, this)
+ .show();
+ }
+ else {
+ Toast.makeText(this, R.string.msg_no_savegames, Toast.LENGTH_SHORT)
+ .show();
+ }
+ return true;
+ }
+
+ case R.id.mi_clear_log: {
+ retainerFragment.messageBuffer.clear();
+ messages.notifyDataSetChanged();
+ return true;
+ }
+ case R.id.mi_help: {
+ Intent browserIntent = new Intent(Intent.ACTION_VIEW,
+ Uri.parse(getString(R.string.help_url)));
+ startActivity(browserIntent);
+ return true;
+ }
+ case R.id.mi_restart: {
+ pendingAction = PENDING_RESTART;
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle(R.string.title_please_confirm)
+ .setMessage(R.string.msg_really_restart)
+ .setPositiveButton(android.R.string.yes, this)
+ .setNegativeButton(android.R.string.no, this).show();
+ return true;
+ }
+
+ case android.R.id.home:
+ // This ID represents the Home or Up button. In the case of this
+ // activity, the Up button is shown. Use NavUtils to allow users
+ // to navigate up one level in the application structure. For
+ // more details, see the Navigation pattern on Android Design:
+ //
+ // http://developer.android.com/design/patterns/navigation.html#up-vs-back
+ //
+ NavUtils.navigateUpFromSameTask(this);
+ return true;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
+ /**
+ * Fill the inputbuffer, start the engine. Calling this while the engine is
+ * not idle is a no-op.
+ *
+ * @param inputBuffer
+ * what to put on the inputbuffer
+ */
+ public void executeCommand(byte[] inputBuffer) {
+ ZMachine engine = retainerFragment.engine;
+ if (engine != null && engine.getRunState() != ZMachine.STATE_RUNNING) {
+ retainerFragment.engine.fillInputBuffer(inputBuffer);
+ if (retainerFragment.engine.getRunState() != ZMachine.STATE_WAIT_CHAR) {
+ String tmp = new String(inputBuffer).replaceAll("\n", "").trim();
+ retainerFragment.messageBuffer.add(new StoryItem(
+ new String(tmp).trim(), StoryItem.MYSELF));
+ }
+ retainerFragment.engine.run();
+ publishResult();
+ }
+ }
+
+ /**
+ * Callback: publish results after the engine has run
+ */
+ public void publishResult() {
+
+ ZWindow upper = retainerFragment.engine.window[1];
+ ZWindow lower = retainerFragment.engine.window[0];
+ ZStatus status = retainerFragment.engine.status_line;
+ String tmp;
+ boolean showLower = false;
+
+ if (status != null) {
+ // Z3 game -> copy the status bar object into the upper window.
+ retainerFragment.engine.update_status_line();
+ retainerFragment.upperWindow = status.toString();
+ statusWindow.setText(retainerFragment.upperWindow);
+ }
+ else {
+ if (upper.maxCursor > 0) {
+ // The normal, "status bar" upper window.
+ tmp = upper.stringyfy(upper.startWindow, upper.maxCursor);
+ }
+ else {
+ tmp = "";
+ }
+ statusWindow.setText(tmp);
+ retainerFragment.upperWindow = tmp;
+ }
+ upper.retrieved();
+
+ if (lower.cursor > 0) {
+ tmp = new String(lower.frameBuffer, 0, lower.noPrompt());
+ retainerFragment.messageBuffer
+ .add(new StoryItem(tmp, StoryItem.NARRATOR));
+ showLower = true;
+ }
+ lower.retrieved();
+
+ while (retainerFragment.messageBuffer.size() > MAXMESSAGES) {
+ // Throw out old stuff.
+ retainerFragment.messageBuffer.remove(0);
+ }
+ messages.notifyDataSetChanged();
+
+ // NOTE:smoothScroll() does not work properly if the theme defines
+ // dividerheight > 0!
+ storyBoard
+ .smoothScrollToPosition(retainerFragment.messageBuffer.size() - 1);
+
+ inputFragment.reset();
+
+ // Kinda dirty: assume that the lower window is the important one. If
+ // anything got added to it, ensure that it is visible. Otherwise assume
+ // that we are dealing with something like a menu and switch the display to
+ // display the upperwindow
+ flipView(showLower);
+ figurePromptStyle();
+ }
+
+ /**
+ * show the correct prompt.
+ */
+ private void figurePromptStyle() {
+ if (retainerFragment.engine.getRunState() == ZMachine.STATE_WAIT_CHAR
+ && inputFragment.isPrompt()) {
+ inputFragment.toggleInput();
+ }
+ if (retainerFragment.engine.getRunState() == ZMachine.STATE_WAIT_CMD
+ && !inputFragment.isPrompt()) {
+ inputFragment.toggleInput();
+ }
+
+ // NOTE: on Gingerbread, onCreateOptionsMenu is not called till the user
+ // presses the menu button. In that case menuSave is null.
+ if (menuSave != null) {
+ // See: ZMachine.restore()
+ menuSave.setEnabled(inputFragment.isPrompt());
+ }
+ }
+
+ @Override
+ public boolean onDown(MotionEvent e) {
+ return false;
+ }
+
+ @Override
+ public void onShowPress(MotionEvent e) {
+ }
+
+ @Override
+ public boolean onSingleTapUp(MotionEvent e) {
+ return false;
+ }
+
+ @Override
+ public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
+ float distanceY) {
+ return false;
+ }
+
+ @Override
+ public void onLongPress(MotionEvent e) {
+ }
+
+ @Override
+ public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
+ float velocityY) {
+ boolean result = false;
+ try {
+ float diffY = e2.getY() - e1.getY();
+ float diffX = e2.getX() - e1.getX();
+ if (Math.abs(diffX) > Math.abs(diffY)) {
+ if (Math.abs(diffX) > SWIPE_THRESHOLD
+ && Math.abs(velocityX) > SWIPE_VELOCITY_THRESHOLD) {
+ if (diffX > 0) {
+ windowFlipper.setInAnimation(AnimationUtils.loadAnimation(this,
+ android.R.anim.slide_in_left));
+ windowFlipper.setOutAnimation(AnimationUtils.loadAnimation(this,
+ android.R.anim.slide_out_right));
+ windowFlipper.showPrevious();
+ result = true;
+ }
+ else {
+
+ windowFlipper.setInAnimation(AnimationUtils.loadAnimation(this,
+ R.animator.slide_in_right));
+ windowFlipper.setOutAnimation(AnimationUtils.loadAnimation(this,
+ R.animator.slide_out_left));
+ windowFlipper.showPrevious();
+ result = true;
+ }
+ }
+ }
+ }
+ catch (Exception exception) {
+ exception.printStackTrace();
+ }
+ return result;
+ }
+
+ /**
+ * Make either the storyboard or the statusscreen visible
+ *
+ * @param showstory
+ * true to swtich to the story view, false to swtich to the status
+ * screen. nothing happens if the desired view is already showing.
+ */
+ private void flipView(boolean showstory) {
+ View now = windowFlipper.getCurrentView();
+
+ if (showstory) {
+ if (now != storyBoard) {
+ windowFlipper.setInAnimation(AnimationUtils.loadAnimation(this,
+ R.animator.slide_in_right));
+ windowFlipper.setOutAnimation(AnimationUtils.loadAnimation(this,
+ R.animator.slide_out_left));
+ windowFlipper.showPrevious();
+ }
+ }
+ else {
+ if (now == storyBoard) {
+ windowFlipper.setInAnimation(AnimationUtils.loadAnimation(this,
+ android.R.anim.slide_in_left));
+ windowFlipper.setOutAnimation(AnimationUtils.loadAnimation(this,
+ android.R.anim.slide_out_right));
+ windowFlipper.showPrevious();
+ }
+ }
+ }
+
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ gestureDetector.onTouchEvent(event);
+ return false; // NOTE: always use false when flinging scrollviews.
+ }
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ switch (pendingAction) {
+ case PENDING_RESTART: {
+ if (which == DialogInterface.BUTTON_POSITIVE) {
+ retainerFragment.messageBuffer.clear();
+ retainerFragment.engine.restart();
+ retainerFragment.engine.run();
+ publishResult();
+ }
+ break;
+ }
+ case PENDING_SAVE: {
+ String name = saveName.getEditableText().toString();
+ name = name.replace('/', '_');
+ if (name.length() > 0) {
+ ZState state = new ZState(retainerFragment.engine);
+ File f = new File(FileUtil.getSaveGameDir(storyFile), name);
+ state.disk_save(f.getPath(), retainerFragment.engine.pc);
+ Toast.makeText(this, R.string.msg_game_saved, Toast.LENGTH_SHORT)
+ .show();
+ }
+ }
+
+ case PENDING_RESTORE: {
+ if (which > -1) {
+ File file = FileUtil.listSaveGames(storyFile)[which];
+ ZState state = new ZState(retainerFragment.engine);
+ if (state.restore_from_disk(file.getPath())) {
+ statusWindow.setText(""); // Wrong, but the best we can do.
+ retainerFragment.messageBuffer.clear();
+ messages.notifyDataSetChanged();
+ retainerFragment.engine.restore(state);
+ figurePromptStyle();
+ Toast
+ .makeText(this, R.string.msg_game_restored, Toast.LENGTH_SHORT)
+ .show();
+ }
+ else {
+ Toast.makeText(this, R.string.msg_restore_failed,
+ Toast.LENGTH_SHORT).show();
+ }
+ }
+ }
+ }
+
+ pendingAction = PENDING_NONE;
+ }
+
+}
diff --git a/src/de/onyxbits/textfiction/ImportTask.java b/src/de/onyxbits/textfiction/ImportTask.java
new file mode 100644
index 0000000..23f15fc
--- /dev/null
+++ b/src/de/onyxbits/textfiction/ImportTask.java
@@ -0,0 +1,162 @@
+package de.onyxbits.textfiction;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.Arrays;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.os.AsyncTask;
+import android.os.Environment;
+import android.util.Log;
+import android.widget.Toast;
+
+/**
+ * Helper task for the LibraryFragment that takes care of copying games from the
+ * download directory to the library directory.
+ */
+class ImportTask extends AsyncTask