aboutsummaryrefslogtreecommitdiffstats
path: root/Android/src/org/mysociety/FixMyStreet/FixMyStreet.java
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-09-25 12:28:34 +0100
committerStruan Donald <struan@exo.org.uk>2013-09-25 12:28:34 +0100
commit2b8846e4a395fb4e6b92d38c11351d208c644bf6 (patch)
treeafb7e89a7a0df60c03d4f19c5ca7b3f7f54fab51 /Android/src/org/mysociety/FixMyStreet/FixMyStreet.java
parent0c8571a1a2323da7a726a60b959765eff3bdb219 (diff)
Give main class a better name for neatness
Diffstat (limited to 'Android/src/org/mysociety/FixMyStreet/FixMyStreet.java')
-rw-r--r--Android/src/org/mysociety/FixMyStreet/FixMyStreet.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/Android/src/org/mysociety/FixMyStreet/FixMyStreet.java b/Android/src/org/mysociety/FixMyStreet/FixMyStreet.java
new file mode 100644
index 0000000..a88ae25
--- /dev/null
+++ b/Android/src/org/mysociety/FixMyStreet/FixMyStreet.java
@@ -0,0 +1,28 @@
+package org.mysociety.FixMyStreet;
+
+import android.os.Bundle;
+import android.view.WindowManager;
+
+import org.apache.cordova.*;
+
+public class FixMyStreet extends DroidGap {
+ /** Called when the activity is first created. */
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ /* yes, we are using a magic number here but the version constants aren't defined
+ until the relevant release so if you want to check against a version that's
+ after your minimum target version you have to use the number :(
+ in this case 11 is Honeycomb / 3.0 */
+ if (android.os.Build.VERSION.SDK_INT <= 11) {
+ /* If we leave the default on for android 2 then on the details screen it scrolls
+ the details screen in such a way that you can't see where you are typing so
+ we switch back to adjustPan. We don't want to use that all the time as adjustPan
+ stops you scrolling the screen when the softKeyboard is displayed which is what
+ we'd like to be able to do so people can scroll to see if there are other
+ fields. */
+ getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
+ }
+ super.loadUrl("file:///android_asset/www/src/index.html", 30000);
+ }
+} \ No newline at end of file