diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b6b1eec --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +*/bin/* +*/gen/* +.idea/ +.gradle/ +*/.DS_Store +gradle/ +gradlew +gradlew.bat +*/build/ +build/ +*.iml diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..f2533c7 --- /dev/null +++ b/build.gradle @@ -0,0 +1,9 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.1.0' + } +} diff --git a/formbuilder-android/.classpath b/formbuilder-android/.classpath index 7bc01d9..d0eff61 100644 --- a/formbuilder-android/.classpath +++ b/formbuilder-android/.classpath @@ -3,6 +3,8 @@ + + diff --git a/formbuilder-android/.gitignore b/formbuilder-android/.gitignore index b6b5597..73a5bf6 100644 --- a/formbuilder-android/.gitignore +++ b/formbuilder-android/.gitignore @@ -2,7 +2,7 @@ .metadata/ .project .settings/ - bin/ - gen/ + ./bin/ + ./gen/ diff --git a/formbuilder-android/.project b/formbuilder-android/.project new file mode 100644 index 0000000..d97a6e3 --- /dev/null +++ b/formbuilder-android/.project @@ -0,0 +1,33 @@ + + + formbuilder-android + + + + + + 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/formbuilder-android/.settings/org.eclipse.jdt.core.prefs b/formbuilder-android/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..b080d2d --- /dev/null +++ b/formbuilder-android/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/formbuilder-android/AndroidManifest.xml b/formbuilder-android/AndroidManifest.xml index e8a3465..54a451b 100644 --- a/formbuilder-android/AndroidManifest.xml +++ b/formbuilder-android/AndroidManifest.xml @@ -4,13 +4,14 @@ android:versionName="1.0" > + android:minSdkVersion="9" + android:targetSdkVersion="19" /> + android:label="@string/app_name" + android:theme="@style/AppBaseTheme"> - + \ No newline at end of file diff --git a/formbuilder-android/How to change the UI b/formbuilder-android/How to change the UI new file mode 100644 index 0000000..cce36ee --- /dev/null +++ b/formbuilder-android/How to change the UI @@ -0,0 +1,28 @@ + +How to change the image for radio button/checkbox: + +1. Download the drawable/image from "http://android-holo-colors.com/". + This site can be used to download the drawables for the color of your choice. + +2. Transfer the contents to "workspace\FormBuilder-Android\formbuilder-android\res". + Ensure that the files are present in the various drawable folders. + +3. Go to "radio_custom.xml" for radio button, or "check_custom.xml" for checkbox present in the drawable folder. + +4. Identify the name of the image file in the required item tag-->android:drawable and change the file to the required + drawable. + + +How to change colors in UI: + +1. Go to "color.xml" present in res/values. + +2. To change the TextView color, change the present color code to the required color code for the color name + "TextViewNormal". + +3. To change the color of EditText borders, change the present color code to the required color code for the color name + 1) "EditTextBeforeBorder" - When the focus is not on the EditText + 2) "EditTextAfterBorder" - When the focus is on the EditText + +4. To change the color of the ErrorMessage, change the present color code to the required color code for the color name + "ErrorMessage". \ No newline at end of file diff --git a/formbuilder-android/build.gradle b/formbuilder-android/build.gradle new file mode 100644 index 0000000..a71a9e2 --- /dev/null +++ b/formbuilder-android/build.gradle @@ -0,0 +1,39 @@ +apply plugin: 'android-library' + +dependencies { + compile fileTree(dir: 'libs', include: '*.jar') +} + +android { + compileSdkVersion 19 + buildToolsVersion "22.0.1" + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + resources.srcDirs = ['src'] + aidl.srcDirs = ['src'] + renderscript.srcDirs = ['src'] + res.srcDirs = ['res'] + assets.srcDirs = ['assets'] + } + + // Move the tests to tests/java, tests/res, etc... + instrumentTest.setRoot('tests') + + // Move the build types to build-types/ + // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... + // This moves them out of them default location under src//... which would + // conflict with src/ being used by the main source set. + // Adding new build types or product flavors should be accompanied + // by a similar customization. + debug.setRoot('build-types/debug') + release.setRoot('build-types/release') + } +} diff --git a/formbuilder-android/lint.xml b/formbuilder-android/lint.xml index ee0eead..7732133 100644 --- a/formbuilder-android/lint.xml +++ b/formbuilder-android/lint.xml @@ -1,3 +1,4 @@ + \ No newline at end of file diff --git a/formbuilder-android/project.properties b/formbuilder-android/project.properties new file mode 100644 index 0000000..91d2b02 --- /dev/null +++ b/formbuilder-android/project.properties @@ -0,0 +1,15 @@ +# 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-19 +android.library=true diff --git a/formbuilder-android/res/drawable-hdpi/apptheme_btn_check_off_focused_holo_light.png b/formbuilder-android/res/drawable-hdpi/apptheme_btn_check_off_focused_holo_light.png new file mode 100644 index 0000000..86796c8 Binary files /dev/null and b/formbuilder-android/res/drawable-hdpi/apptheme_btn_check_off_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable-hdpi/apptheme_btn_check_on_focused_holo_light.png b/formbuilder-android/res/drawable-hdpi/apptheme_btn_check_on_focused_holo_light.png new file mode 100644 index 0000000..c7f6676 Binary files /dev/null and b/formbuilder-android/res/drawable-hdpi/apptheme_btn_check_on_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable-hdpi/apptheme_btn_radio_off_disabled_holo_light.png b/formbuilder-android/res/drawable-hdpi/apptheme_btn_radio_off_disabled_holo_light.png new file mode 100644 index 0000000..25e8e1b Binary files /dev/null and b/formbuilder-android/res/drawable-hdpi/apptheme_btn_radio_off_disabled_holo_light.png differ diff --git a/formbuilder-android/res/drawable-hdpi/apptheme_btn_radio_on_focused_holo_light.png b/formbuilder-android/res/drawable-hdpi/apptheme_btn_radio_on_focused_holo_light.png new file mode 100644 index 0000000..5e7a8a1 Binary files /dev/null and b/formbuilder-android/res/drawable-hdpi/apptheme_btn_radio_on_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable-mdpi/apptheme_btn_check_off_focused_holo_light.png b/formbuilder-android/res/drawable-mdpi/apptheme_btn_check_off_focused_holo_light.png new file mode 100644 index 0000000..ed1a777 Binary files /dev/null and b/formbuilder-android/res/drawable-mdpi/apptheme_btn_check_off_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable-mdpi/apptheme_btn_check_on_focused_holo_light.png b/formbuilder-android/res/drawable-mdpi/apptheme_btn_check_on_focused_holo_light.png new file mode 100644 index 0000000..30e4424 Binary files /dev/null and b/formbuilder-android/res/drawable-mdpi/apptheme_btn_check_on_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable-mdpi/apptheme_btn_radio_off_focused_holo_light.png b/formbuilder-android/res/drawable-mdpi/apptheme_btn_radio_off_focused_holo_light.png new file mode 100644 index 0000000..88c4e5e Binary files /dev/null and b/formbuilder-android/res/drawable-mdpi/apptheme_btn_radio_off_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable-mdpi/apptheme_btn_radio_on_focused_holo_light.png b/formbuilder-android/res/drawable-mdpi/apptheme_btn_radio_on_focused_holo_light.png new file mode 100644 index 0000000..ee76e43 Binary files /dev/null and b/formbuilder-android/res/drawable-mdpi/apptheme_btn_radio_on_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable-xhdpi/apptheme_btn_check_off_focused_holo_light.png b/formbuilder-android/res/drawable-xhdpi/apptheme_btn_check_off_focused_holo_light.png new file mode 100644 index 0000000..cca5fd6 Binary files /dev/null and b/formbuilder-android/res/drawable-xhdpi/apptheme_btn_check_off_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable-xhdpi/apptheme_btn_check_on_focused_holo_light.png b/formbuilder-android/res/drawable-xhdpi/apptheme_btn_check_on_focused_holo_light.png new file mode 100644 index 0000000..d584134 Binary files /dev/null and b/formbuilder-android/res/drawable-xhdpi/apptheme_btn_check_on_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable-xhdpi/apptheme_btn_radio_off_focused_holo_light.png b/formbuilder-android/res/drawable-xhdpi/apptheme_btn_radio_off_focused_holo_light.png new file mode 100644 index 0000000..04a8890 Binary files /dev/null and b/formbuilder-android/res/drawable-xhdpi/apptheme_btn_radio_off_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable-xhdpi/apptheme_btn_radio_on_focused_holo_light.png b/formbuilder-android/res/drawable-xhdpi/apptheme_btn_radio_on_focused_holo_light.png new file mode 100644 index 0000000..72b0250 Binary files /dev/null and b/formbuilder-android/res/drawable-xhdpi/apptheme_btn_radio_on_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable-xxhdpi/apptheme_btn_check_off_focused_holo_light.png b/formbuilder-android/res/drawable-xxhdpi/apptheme_btn_check_off_focused_holo_light.png new file mode 100644 index 0000000..04cbf7b Binary files /dev/null and b/formbuilder-android/res/drawable-xxhdpi/apptheme_btn_check_off_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable-xxhdpi/apptheme_btn_check_on_focused_holo_light.png b/formbuilder-android/res/drawable-xxhdpi/apptheme_btn_check_on_focused_holo_light.png new file mode 100644 index 0000000..8d9a36c Binary files /dev/null and b/formbuilder-android/res/drawable-xxhdpi/apptheme_btn_check_on_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable-xxhdpi/apptheme_btn_radio_off_focused_holo_light.png b/formbuilder-android/res/drawable-xxhdpi/apptheme_btn_radio_off_focused_holo_light.png new file mode 100644 index 0000000..dc00f77 Binary files /dev/null and b/formbuilder-android/res/drawable-xxhdpi/apptheme_btn_radio_off_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable-xxhdpi/apptheme_btn_radio_on_focused_holo_light.png b/formbuilder-android/res/drawable-xxhdpi/apptheme_btn_radio_on_focused_holo_light.png new file mode 100644 index 0000000..8e9032b Binary files /dev/null and b/formbuilder-android/res/drawable-xxhdpi/apptheme_btn_radio_on_focused_holo_light.png differ diff --git a/formbuilder-android/res/drawable/after_select.xml b/formbuilder-android/res/drawable/after_select.xml new file mode 100644 index 0000000..fa2adbf --- /dev/null +++ b/formbuilder-android/res/drawable/after_select.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/formbuilder-android/res/drawable/before_select.xml b/formbuilder-android/res/drawable/before_select.xml new file mode 100644 index 0000000..68827f9 --- /dev/null +++ b/formbuilder-android/res/drawable/before_select.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + diff --git a/formbuilder-android/res/drawable/button_pressed.xml b/formbuilder-android/res/drawable/button_pressed.xml new file mode 100644 index 0000000..58609b8 --- /dev/null +++ b/formbuilder-android/res/drawable/button_pressed.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/formbuilder-android/res/drawable/button_select.xml b/formbuilder-android/res/drawable/button_select.xml new file mode 100644 index 0000000..079ddae --- /dev/null +++ b/formbuilder-android/res/drawable/button_select.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/formbuilder-android/res/drawable/button_unpressed.xml b/formbuilder-android/res/drawable/button_unpressed.xml new file mode 100644 index 0000000..4978a4f --- /dev/null +++ b/formbuilder-android/res/drawable/button_unpressed.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/formbuilder-android/res/drawable/check_custom.xml b/formbuilder-android/res/drawable/check_custom.xml new file mode 100644 index 0000000..5089632 --- /dev/null +++ b/formbuilder-android/res/drawable/check_custom.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/formbuilder-android/res/drawable/cross_2.png b/formbuilder-android/res/drawable/cross_2.png new file mode 100644 index 0000000..e3d1495 Binary files /dev/null and b/formbuilder-android/res/drawable/cross_2.png differ diff --git a/formbuilder-android/res/drawable/cross_grey.png b/formbuilder-android/res/drawable/cross_grey.png new file mode 100644 index 0000000..cdfda79 Binary files /dev/null and b/formbuilder-android/res/drawable/cross_grey.png differ diff --git a/formbuilder-android/res/drawable/edit_text_selector.xml b/formbuilder-android/res/drawable/edit_text_selector.xml new file mode 100644 index 0000000..1e7789b --- /dev/null +++ b/formbuilder-android/res/drawable/edit_text_selector.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/formbuilder-android/res/drawable/prev_next_buttons.xml b/formbuilder-android/res/drawable/prev_next_buttons.xml new file mode 100644 index 0000000..8db3998 --- /dev/null +++ b/formbuilder-android/res/drawable/prev_next_buttons.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + diff --git a/formbuilder-android/res/drawable/radio_custom.xml b/formbuilder-android/res/drawable/radio_custom.xml new file mode 100644 index 0000000..56cc355 --- /dev/null +++ b/formbuilder-android/res/drawable/radio_custom.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/formbuilder-android/res/drawable/spinner_pressed_false.xml b/formbuilder-android/res/drawable/spinner_pressed_false.xml new file mode 100644 index 0000000..7ee5e9e --- /dev/null +++ b/formbuilder-android/res/drawable/spinner_pressed_false.xml @@ -0,0 +1,16 @@ + + + + + + + + + + \ No newline at end of file diff --git a/formbuilder-android/res/drawable/spinner_pressed_true.xml b/formbuilder-android/res/drawable/spinner_pressed_true.xml new file mode 100644 index 0000000..4ab5b95 --- /dev/null +++ b/formbuilder-android/res/drawable/spinner_pressed_true.xml @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/formbuilder-android/res/drawable/spinner_selector.xml b/formbuilder-android/res/drawable/spinner_selector.xml new file mode 100644 index 0000000..dc9b047 --- /dev/null +++ b/formbuilder-android/res/drawable/spinner_selector.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/formbuilder-android/res/layout/address.xml b/formbuilder-android/res/layout/address.xml new file mode 100644 index 0000000..861c386 --- /dev/null +++ b/formbuilder-android/res/layout/address.xml @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/formbuilder-android/res/layout/capture.xml b/formbuilder-android/res/layout/capture.xml new file mode 100644 index 0000000..945d8c3 --- /dev/null +++ b/formbuilder-android/res/layout/capture.xml @@ -0,0 +1,66 @@ + + + + + + + + +