commit df7ba79871ab4f675c76df17644b176c141fb6db Author: Russell Beattie Date: Sat Sep 8 22:22:51 2012 -0700 Initial commit. (yay!) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e2ff37a --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +# built application files +*.apk +*.ap_ + +# files for the dex VM +*.dex + +# Java class files +*.class + +# generated files +bin/ +gen/ + +# Local configuration file (sdk path, etc) +local.properties + +# Eclipse project files +.classpath +.project \ No newline at end of file diff --git a/AndroidManifest.xml b/AndroidManifest.xml new file mode 100644 index 0000000..d226f79 --- /dev/null +++ b/AndroidManifest.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/www/clever.png b/assets/www/clever.png new file mode 100644 index 0000000..1b5951d Binary files /dev/null and b/assets/www/clever.png differ diff --git a/assets/www/index.html b/assets/www/index.html new file mode 100644 index 0000000..aafb596 --- /dev/null +++ b/assets/www/index.html @@ -0,0 +1,100 @@ + + + + + + Clever + + + + + + + + +
+ +
+ +
+ +
+ + + diff --git a/libs/android-support-v4.jar b/libs/android-support-v4.jar new file mode 100644 index 0000000..feaf44f Binary files /dev/null and b/libs/android-support-v4.jar differ diff --git a/lint.xml b/lint.xml new file mode 100644 index 0000000..366ed93 --- /dev/null +++ b/lint.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file 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..0840b4a --- /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-15 diff --git a/res/drawable/.DS_Store b/res/drawable/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/res/drawable/.DS_Store differ diff --git a/res/drawable/icon.png b/res/drawable/icon.png new file mode 100644 index 0000000..736bc54 Binary files /dev/null and b/res/drawable/icon.png differ diff --git a/res/layout/activity_main.xml b/res/layout/activity_main.xml new file mode 100644 index 0000000..46269b5 --- /dev/null +++ b/res/layout/activity_main.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml new file mode 100644 index 0000000..d097ae0 --- /dev/null +++ b/res/values/strings.xml @@ -0,0 +1,6 @@ + + + Clever + Clever + + \ No newline at end of file diff --git a/src/io/clever/MainActivity.java b/src/io/clever/MainActivity.java new file mode 100644 index 0000000..c0cc031 --- /dev/null +++ b/src/io/clever/MainActivity.java @@ -0,0 +1,67 @@ +package io.clever; + +import android.os.Bundle; +import android.app.Activity; +import android.view.View; +import android.webkit.*; +import android.webkit.WebSettings.*; + + +public class MainActivity extends Activity { + + WebView webView; + + @Override + public void onCreate(Bundle savedInstanceState) { + + super.onCreate(savedInstanceState); + + setContentView(R.layout.activity_main); + + webView = (WebView) findViewById(R.id.webView1); + + + WebSettings webSettings = webView.getSettings(); + + webView.setWebChromeClient(new WebChromeClient()); + webView.setWebViewClient(new WebViewClient()); + + webSettings.setJavaScriptEnabled(true); + webSettings.setDomStorageEnabled(true); + //webSettings.setBuiltInZoomControls(false); + //webSettings.setSupportZoom(false); + //webSettings.setTextZoom(80); + //webSettings.setDefaultZoom(ZoomDensity.FAR); + webSettings.setSaveFormData(false); + webSettings.setDatabaseEnabled(true); + webSettings.setDatabasePath("/data/data/" + webView.getContext().getPackageName() + "/databases/"); + + webSettings.setLightTouchEnabled(false); + webSettings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL); + webSettings.setUserAgentString("Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Large Screen Safari/534.24 GoogleTV"); + + webView.setInitialScale(90); + + webView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE); + + webView.loadUrl("file:///android_asset/www/index.html"); + + } + + @Override + public void onBackPressed() + { + if(webView.canGoBack()){ + + webView.goBack(); + webView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE); + + } else { + + super.onBackPressed(); + + } + } + + +}