Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*/bin/*
*/gen/*
.idea/
.gradle/
*/.DS_Store
gradle/
gradlew
gradlew.bat
*/build/
build/
*.iml
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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'
}
}
2 changes: 2 additions & 0 deletions formbuilder-android/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="lib" path="libs/android-support-v4.jar"/>
<classpathentry exported="true" kind="lib" path="libs/gson-2.3.1.jar"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
Expand Down
4 changes: 2 additions & 2 deletions formbuilder-android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.metadata/
.project
.settings/
bin/
gen/
./bin/
./gen/


33 changes: 33 additions & 0 deletions formbuilder-android/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>formbuilder-android</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
4 changes: 4 additions & 0 deletions formbuilder-android/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -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
9 changes: 5 additions & 4 deletions formbuilder-android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="21" />
android:minSdkVersion="9"
android:targetSdkVersion="19" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name">
android:label="@string/app_name"
android:theme="@style/AppBaseTheme">
</application>

</manifest>
</manifest>
28 changes: 28 additions & 0 deletions formbuilder-android/How to change the UI
Original file line number Diff line number Diff line change
@@ -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".
39 changes: 39 additions & 0 deletions formbuilder-android/build.gradle
Original file line number Diff line number Diff line change
@@ -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/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... 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')
}
}
1 change: 1 addition & 0 deletions formbuilder-android/lint.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="InflateParams" severity="ignore" />
</lint>
15 changes: 15 additions & 0 deletions formbuilder-android/project.properties
Original file line number Diff line number Diff line change
@@ -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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions formbuilder-android/res/drawable/after_select.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:radius="1dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />

<size android:height="45dp" />

<stroke
android:width="2dp"
android:color="@color/EditTextAfterBorder" />

<solid android:color="@android:color/white" />

<padding
android:bottom="2dp"
android:left="10dp"
android:right="10dp"
android:top="2dp" />
</shape>
24 changes: 24 additions & 0 deletions formbuilder-android/res/drawable/before_select.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:radius="1dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />

<size android:height="45dp" />

<stroke
android:width="1dp"
android:color="@color/EditTextBeforeBorder" />

<solid android:color="@android:color/white" />

<padding
android:bottom="2dp"
android:left="10dp"
android:right="10dp"
android:top="2dp" />
</shape>
6 changes: 6 additions & 0 deletions formbuilder-android/res/drawable/button_pressed.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

<solid android:color="@color/ButtonColor" />

</shape>
7 changes: 7 additions & 0 deletions formbuilder-android/res/drawable/button_select.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

<item android:drawable="@drawable/button_unpressed" android:state_pressed="false"></item>
<item android:drawable="@drawable/button_pressed" android:state_pressed="true"></item>

</selector>
6 changes: 6 additions & 0 deletions formbuilder-android/res/drawable/button_unpressed.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

<solid android:color="@color/White" />

</shape>
5 changes: 5 additions & 0 deletions formbuilder-android/res/drawable/check_custom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/apptheme_btn_check_off_focused_holo_light" android:state_checked="false"></item>
<item android:drawable="@drawable/apptheme_btn_check_on_focused_holo_light" android:state_checked="true"></item>
</selector>
Binary file added formbuilder-android/res/drawable/cross_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added formbuilder-android/res/drawable/cross_grey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions formbuilder-android/res/drawable/edit_text_selector.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

<item android:drawable="@drawable/before_select" android:state_focused="false"></item>
<item android:drawable="@drawable/after_select" android:state_focused="true"></item>

</selector>
24 changes: 24 additions & 0 deletions formbuilder-android/res/drawable/prev_next_buttons.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<corners
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:radius="1dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />

<size android:height="45dp" />

<stroke
android:width="1dp"
android:color="@color/EditTextBeforeBorder" />

<solid android:color="@android:color/white" />

<padding
android:bottom="2dp"
android:left="10dp"
android:right="10dp"
android:top="2dp" />

</shape>
7 changes: 7 additions & 0 deletions formbuilder-android/res/drawable/radio_custom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >

<item android:drawable="@drawable/apptheme_btn_radio_off_focused_holo_light" android:state_checked="false"></item>
<item android:drawable="@drawable/apptheme_btn_radio_on_focused_holo_light" android:state_checked="true"></item>

</selector>
16 changes: 16 additions & 0 deletions formbuilder-android/res/drawable/spinner_pressed_false.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">

<corners
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:radius="1dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />

<stroke android:width="1dp"
android:color="@color/EditTextBeforeBorder" />

<solid android:color="@android:color/white" />

</shape>
13 changes: 13 additions & 0 deletions formbuilder-android/res/drawable/spinner_pressed_true.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">

<corners
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:radius="1dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />

<solid android:color="@android:color/holo_blue_bright" />

</shape>
7 changes: 7 additions & 0 deletions formbuilder-android/res/drawable/spinner_selector.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/spinner_pressed_false" android:state_pressed="false"></item>
<item android:drawable="@drawable/spinner_pressed_true" android:state_pressed="true"></item>
<item android:drawable="@drawable/spinner_pressed_true" android:state_focused="true"></item>

</selector>
Loading